Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
tlvf: PLATFORM_SON_SLAVE_REGISTER_RESPONSE remove unused fields
Browse files Browse the repository at this point in the history
Remove of unused fields: sPlatformSettings and wlan_settings
from PLATFORM_SON_SLAVE_REGISTER_RESPONSE message.
Those fields have been moved to the Agent_DB and there for no longer
needed as part of this beerocks massage.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
  • Loading branch information
orenvor committed Aug 12, 2020
1 parent 356f096 commit 28a3225
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ class cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE : public BaseClass
static eActionOp_PLATFORM get_action_op(){
return (eActionOp_PLATFORM)(ACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE);
}
sPlatformSettings& platform_settings();
sWlanSettings& wlan_settings();
uint32_t& valid();
void class_swap() override;
bool finalize() override;
Expand All @@ -93,8 +91,6 @@ class cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE : public BaseClass
private:
bool init();
eActionOp_PLATFORM* m_action_op = nullptr;
sPlatformSettings* m_platform_settings = nullptr;
sWlanSettings* m_wlan_settings = nullptr;
uint32_t* m_valid = nullptr;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,23 +185,13 @@ BaseClass(base->getBuffPtr(), base->getBuffRemainingBytes(), parse){
}
cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::~cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE() {
}
sPlatformSettings& cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::platform_settings() {
return (sPlatformSettings&)(*m_platform_settings);
}

sWlanSettings& cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::wlan_settings() {
return (sWlanSettings&)(*m_wlan_settings);
}

uint32_t& cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::valid() {
return (uint32_t&)(*m_valid);
}

void cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::class_swap()
{
tlvf_swap(8*sizeof(eActionOp_PLATFORM), reinterpret_cast<uint8_t*>(m_action_op));
m_platform_settings->struct_swap();
m_wlan_settings->struct_swap();
tlvf_swap(32, reinterpret_cast<uint8_t*>(m_valid));
}

Expand Down Expand Up @@ -235,8 +225,6 @@ bool cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::finalize()
size_t cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::get_initial_size()
{
size_t class_size = 0;
class_size += sizeof(sPlatformSettings); // platform_settings
class_size += sizeof(sWlanSettings); // wlan_settings
class_size += sizeof(uint32_t); // valid
return class_size;
}
Expand All @@ -247,18 +235,6 @@ bool cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE::init()
TLVF_LOG(ERROR) << "Not enough available space on buffer. Class init failed";
return false;
}
m_platform_settings = reinterpret_cast<sPlatformSettings*>(m_buff_ptr__);
if (!buffPtrIncrementSafe(sizeof(sPlatformSettings))) {
LOG(ERROR) << "buffPtrIncrementSafe(" << std::dec << sizeof(sPlatformSettings) << ") Failed!";
return false;
}
if (!m_parse__) { m_platform_settings->struct_init(); }
m_wlan_settings = reinterpret_cast<sWlanSettings*>(m_buff_ptr__);
if (!buffPtrIncrementSafe(sizeof(sWlanSettings))) {
LOG(ERROR) << "buffPtrIncrementSafe(" << std::dec << sizeof(sWlanSettings) << ") Failed!";
return false;
}
if (!m_parse__) { m_wlan_settings->struct_init(); }
m_valid = reinterpret_cast<uint32_t*>(m_buff_ptr__);
if (!buffPtrIncrementSafe(sizeof(uint32_t))) {
LOG(ERROR) << "buffPtrIncrementSafe(" << std::dec << sizeof(uint32_t) << ") Failed!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ cACTION_PLATFORM_SON_SLAVE_REGISTER_REQUEST:

cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE:
_type: class
platform_settings: sPlatformSettings
wlan_settings: sWlanSettings
valid:
_type: uint32_t
_comment: #Marks whether the settings are valid
_comment: # Marks whether the settings received into agent_db

cACTION_PLATFORM_ARP_MONITOR_NOTIFICATION:
_type: class
Expand Down

0 comments on commit 28a3225

Please sign in to comment.