|
@@ -80,7 +80,7 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
|
|
|
switch (transportLayerInst.state)
|
|
|
{
|
|
|
- /** -# look for start of header */
|
|
|
+ /* look for start of header */
|
|
|
case STATE_GET_SOH:
|
|
|
/* if start of header is found, continue transport layer fsm */
|
|
|
if (SHELLMATTA_START_OF_HEADER == *data)
|
|
@@ -99,7 +99,7 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
case STATE_MANUAL_INPUT:
|
|
|
break;
|
|
|
|
|
|
- /** -# look for protocol version */
|
|
|
+ /* look for protocol version */
|
|
|
case STATE_GET_PROTOCOL_VERSION:
|
|
|
/* check protocol version */
|
|
|
if (PROTOCOL_VERSION == *data)
|
|
@@ -114,32 +114,32 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- /** -# read packet type */
|
|
|
+ /* read packet type */
|
|
|
case STATE_GET_PACKET_TYPE:
|
|
|
transportLayerInst.state = STATE_GET_PAYLOAD_LENGTH;
|
|
|
break;
|
|
|
|
|
|
- /** -# look for length of payload */
|
|
|
+ /* look for length of payload */
|
|
|
case STATE_GET_PAYLOAD_LENGTH:
|
|
|
transportLayerInst.state = STATE_GET_SOURCE;
|
|
|
break;
|
|
|
|
|
|
- /** -# look for source */
|
|
|
+ /* look for source */
|
|
|
case STATE_GET_SOURCE:
|
|
|
transportLayerInst.state = STATE_GET_DESTINATION;
|
|
|
break;
|
|
|
|
|
|
- /** -# look for destination */
|
|
|
+ /* look for destination */
|
|
|
case STATE_GET_DESTINATION:
|
|
|
transportLayerInst.state = STATE_GET_H2S_SEQUENCE_CNT;
|
|
|
break;
|
|
|
|
|
|
- /** -# look for h2s sequence counter*/
|
|
|
+ /* look for h2s sequence counter*/
|
|
|
case STATE_GET_H2S_SEQUENCE_CNT:
|
|
|
transportLayerInst.state = STATE_GET_S2H_SEQUENCE_CNT;
|
|
|
break;
|
|
|
|
|
|
- /** -# look for s2h sequence counter */
|
|
|
+ /* look for s2h sequence counter */
|
|
|
case STATE_GET_S2H_SEQUENCE_CNT:
|
|
|
if (packetType == PACKET_SEQ_CNT_REQUEST)
|
|
|
{
|
|
@@ -151,7 +151,7 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- /** -# read payload for previously read length of payload */
|
|
|
+ /* read payload for previously read length of payload */
|
|
|
case STATE_GET_PAYLOAD:
|
|
|
if ( (payloadLength <= payloadCounter)
|
|
|
&& (true == transportLayerInst.active))
|
|
@@ -160,9 +160,9 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- /** -# read crc32 for four bytes */
|
|
|
+ /* read crc32 for four bytes */
|
|
|
case STATE_GET_CRC:
|
|
|
- /** -# if crc32 is read, start computing */
|
|
|
+ /* if crc32 is read, start computing */
|
|
|
if (SHELLMATTA_LENGTH_CRC <= crcCounter)
|
|
|
{
|
|
|
/* for crc computation only */
|
|
@@ -182,7 +182,7 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
|
|
|
refCrc = crc32Calc(crcdata, SHELLMATTA_HEADER_LENGTH + payloadLength);
|
|
|
|
|
|
- /** #- if crc is correct, further handling of data depends on type of packet */
|
|
|
+ /* if crc is correct, further handling of data depends on type of packet */
|
|
|
if (crc32 == refCrc)
|
|
|
{
|
|
|
/* reset fsm by default */
|
|
@@ -245,7 +245,7 @@ shellmatta_retCode_t shellmatta_handle_transport_fsm(char *data)
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- /** -# start to process payload as if it was entered manually */
|
|
|
+ /* start to process payload as if it was entered manually */
|
|
|
case STATE_PROCESS_PAYLOAD:
|
|
|
transportLayerInst.state = STATE_GET_SOH;
|
|
|
protocolVersion = 0u;
|