47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
|
|
/** @file doxygen_c.h
|
||
|
|
* @author My Self
|
||
|
|
* @date 9 Sep 2012
|
||
|
|
* https://ciapini.wiki.esiliati.org/view/ArNet
|
||
|
|
*/
|
||
|
|
|
||
|
|
#ifndef ARNET_STATE_H
|
||
|
|
#define ARNET_STATE_H
|
||
|
|
|
||
|
|
#include "arnet_cli.h"
|
||
|
|
#include "arnet_types.h"
|
||
|
|
|
||
|
|
/** An enum type.
|
||
|
|
* The documentation block cannot be put after the enum!
|
||
|
|
*/
|
||
|
|
typedef struct {
|
||
|
|
uint8_t vc;
|
||
|
|
uint8_t ec;
|
||
|
|
} arnet_enabled_headers;
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
uint8_t address; ///< indirizzo del nodo
|
||
|
|
uint8_t current_peer; ///< nodo remoto
|
||
|
|
uint8_t multicast_address; ///< indirizzo multicast del nodo
|
||
|
|
uint8_t congestion; ///< congestione
|
||
|
|
uint16_t time; ///< tempo del nodo
|
||
|
|
uint16_t date; ///< data del nodo
|
||
|
|
arnet_enabled_headers enabled; ///< header abilitati
|
||
|
|
} arnet_node_state;
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
uint8_t address;
|
||
|
|
} arnet_segment_state;
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
// uint8_t vci;
|
||
|
|
uint8_t sequence;
|
||
|
|
uint8_t acknowledge;
|
||
|
|
} arnet_connection_state;
|
||
|
|
|
||
|
|
extern arnet_node_state node; ///< stato del nodo
|
||
|
|
extern arnet_segment_state segment;
|
||
|
|
extern arnet_connection_state connection[ARNET_ADDRESS_SIZE]; ///< stato della connessione
|
||
|
|
|
||
|
|
#endif /* ARNET_STATE_H */
|
||
|
|
|