43 lines
998 B
C
43 lines
998 B
C
/*
|
|
* https://ciapini.wiki.esiliati.org/view/ArNet
|
|
*/
|
|
|
|
#ifndef ARNET_CLI_H
|
|
#define ARNET_CLI_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "../net.h"
|
|
|
|
#define ARNET_CLI_ELEMENT_SEPARATOR ','
|
|
#define ARNET_CLI_KV_SEPARATOR '='
|
|
|
|
// queue
|
|
#define ARNET_CLI_TX_QUEUE 'T'
|
|
|
|
// packet
|
|
#define ARNET_CLI_SRC_ADDR 'S'
|
|
#define ARNET_CLI_DST_ADDR 'D'
|
|
#define ARNET_CLI_HDR_SIZE 'H'
|
|
#define ARNET_CLI_PLD_SIZE 'P'
|
|
|
|
// EC
|
|
|
|
#define ARNET_CLI_EC_ENABLED 'C'
|
|
#define ARNET_CLI_EC_OK 'K'
|
|
|
|
// errors
|
|
#define ARNET_CLI_ERR 'E'
|
|
#define ARNET_CLI_ERR_OK 0
|
|
#define ARNET_CLI_ERR_INVALID_NAME 1
|
|
#define ARNET_CLI_ERR_INVALID_VALUE 2
|
|
|
|
// protoz
|
|
uint8_t arnet_cli_exec(uint8_t name, uint32_t value);
|
|
// uint8_t arnet_cli_parse(uint8_t *Buffer, uint8_t bufferlen);
|
|
uint8_t arnet_cli_print_state(uint8_t *Buffer);
|
|
uint8_t arnet_cli_print_packet(net_packet net_pck, arnet_packet arnet_pck, uint8_t *Buffer);
|
|
|
|
#endif /* ARNET_CLI_H */
|
|
|