41 lines
970 B
C
41 lines
970 B
C
/**
|
|
* @file include/di/rpc/constants/structures.h
|
|
* @brief RPC data structures (from RPC specification)
|
|
* @copyright 2015 Dual Inventive Technology Centre B.V.
|
|
*/
|
|
#ifndef LIBDI_INCLUDE_DI_CONSTANTS_RPC_STRUCTURES_H_
|
|
#define LIBDI_INCLUDE_DI_CONSTANTS_RPC_STRUCTURES_H_
|
|
|
|
#include <stdint.h>
|
|
#include <di/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define DI_RPC_INVALID_UID 0U /**< Invalid class (sensor, notify etc) unique id for all rpc messages */
|
|
|
|
/**
|
|
* DI-Net RPC error object
|
|
*/
|
|
struct di_rpc_error {
|
|
di_errno_t code; /**< Error code */
|
|
uint64_t first; /**< DI-Net timestamp of first occurrence */
|
|
uint64_t last; /**< DI-Net timestamp of last occurrence */
|
|
uint32_t count; /**< Error counter (occurences) */
|
|
};
|
|
|
|
/**
|
|
* Enumerator item for use with "<class>:info"
|
|
*/
|
|
struct di_rpc_enum {
|
|
const char *name; /**< Name */
|
|
int32_t value; /**< Value */
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* LIBDI_INCLUDE_DI_CONSTANTS_RPC_STRUCTURES_H_ */
|