mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
some cosmetic changes on the message format
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@147 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
4f3bacb5be
commit
4ca9509714
3 changed files with 7 additions and 4 deletions
|
@ -10,8 +10,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/** Maximum number of dword values in a message */
|
||||
#define MSG_VALUES 16
|
||||
/** The current version number for the message format */
|
||||
#define MSG_VERSION 0
|
||||
|
||||
/** @todo Implement more message types */
|
||||
|
@ -31,12 +32,12 @@ struct msg
|
|||
unsigned type : 2;
|
||||
/** These bits are reserved for future extensions */
|
||||
unsigned __padding : 2;
|
||||
/** Length in dwords of the whole message */
|
||||
/** Number of valid dword values in msg::data[] */
|
||||
uint8_t length;
|
||||
/** The sequence number gets incremented by one for consecutive messages */
|
||||
uint16_t sequence;
|
||||
/** The message payload */
|
||||
float data[MAX_VALUES];
|
||||
float data[MSG_VALUES];
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif /* _MSG_FORMAT_H_ */
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "cfg.h"
|
||||
#include "utils.h"
|
||||
#include "msg.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <limits.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "msg.h"
|
||||
#include "node.h"
|
||||
#include "utils.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue