|
14 | 14 | #include "ConfiguratorAgents/agents/BoardConfigurationProtocol/cbor/CBORInstances.h" |
15 | 15 | #include "Utility/LEDFeedback/LEDFeedback.h" |
16 | 16 |
|
17 | | -class SerialAgentClass : public ConfiguratorAgent, BoardConfigurationProtocol { |
| 17 | +class SerialAgentClass : public ConfiguratorAgent, BoardConfigurationProtocol { //TODO put private BoardConfigurationProtocol |
18 | 18 | public: |
19 | 19 | SerialAgentClass(); |
20 | 20 | AgentConfiguratorStates begin(); |
21 | 21 | AgentConfiguratorStates end(); |
22 | | - AgentConfiguratorStates poll(); |
| 22 | + AgentConfiguratorStates update(); |
23 | 23 | void disconnectPeer(); |
24 | 24 | bool receivedMsgAvailable(); |
25 | 25 | bool getReceivedMsg(ProvisioningInputMessage &msg); |
@@ -66,7 +66,7 @@ inline ConfiguratorAgent::AgentConfiguratorStates SerialAgentClass::end() { |
66 | 66 | return _state; |
67 | 67 | } |
68 | 68 |
|
69 | | -inline ConfiguratorAgent::AgentConfiguratorStates SerialAgentClass::poll() { |
| 69 | +inline ConfiguratorAgent::AgentConfiguratorStates SerialAgentClass::update() { |
70 | 70 |
|
71 | 71 | switch (_state) { |
72 | 72 | case AgentConfiguratorStates::INIT: _state = handleInit (); break; |
@@ -127,7 +127,7 @@ inline ConfiguratorAgent::AgentConfiguratorStates SerialAgentClass::handleInit() |
127 | 127 | PacketManager::ReceivingState res = PacketManager::PacketReceiver::getInstance().handleReceivedByte(_packet, byte); |
128 | 128 | if (res == PacketManager::ReceivingState::RECEIVED) { |
129 | 129 | if (_packet.Type == PacketManager::MessageType::TRANSMISSION_CONTROL) { |
130 | | - if (_packet.Payload.len() == 1 && _packet.Payload[0] == 0x01) { |
| 130 | + if (_packet.Payload.len() == 1 && _packet.Payload[0] == 0x01) {//TODO use define |
131 | 131 | //CONNECT |
132 | 132 | nextState = AgentConfiguratorStates::PEER_CONNECTED; |
133 | 133 | PacketManager::PacketReceiver::getInstance().clear(_packet); |
|
0 commit comments