DeviceAppMessageSerializer Class Reference

Simu5G: DeviceAppMessageSerializer Class Reference
Simu5G
DeviceAppMessageSerializer Class Reference

#include <DeviceAppPacketSerializer.h>

Detailed Description

Converts between ApplicationPacket and binary (network byte order) application packet.

This serializer works for all the DeviceAppPacket packets. The structure of a DeviceAppPacket packets is the following:

  • packet type code (as of DevAppCode enum)
  • length of the subsequent package size
  • data

auto pkt = pk->peekAtFront<DeviceAppPacket>(); if(strcmp(pkt->getType(), START_MECAPP) == 0) it is a DeviceAppStartPacket

Codes: 0 START 1 STOP 2 ACK START 3 ACK STOP 4 NACK START 5 NACK STOP