add my standard typedefs for integrals
This commit is contained in:
parent
7fc9a09063
commit
28489b9ee8
2 changed files with 25 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include <nng/nng.h>
|
#include <nng/nng.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "dp_types.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -23,8 +25,8 @@ nng_socket make_doom_sub(const char *url);
|
||||||
static const char *const CtrlUrl = "ipc://666_ctrl.socket"; // controller publishes here
|
static const char *const CtrlUrl = "ipc://666_ctrl.socket"; // controller publishes here
|
||||||
static const char *const DoomUrl = "ipc://666_doom.socket"; // dooms publish here
|
static const char *const DoomUrl = "ipc://666_doom.socket"; // dooms publish here
|
||||||
|
|
||||||
typedef uint32_t doomid_t; // unique id for each doom instance
|
typedef u32 doomid_t; // unique id for each doom instance
|
||||||
typedef uint16_t dmt_t; // for DP_MessageType values
|
typedef u16 dmt_t; // for DP_MessageType values
|
||||||
|
|
||||||
enum DP_MessageType
|
enum DP_MessageType
|
||||||
{
|
{
|
||||||
|
|
21
src/dp_types.h
Normal file
21
src/dp_types.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef SRC_DP_TYPES_H
|
||||||
|
#define SRC_DP_TYPES_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#include <cstdint>
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef uint8_t u8;
|
||||||
|
typedef uint16_t u16;
|
||||||
|
typedef uint32_t u32;
|
||||||
|
typedef uint64_t u64;
|
||||||
|
|
||||||
|
typedef int8_t s8;
|
||||||
|
typedef int16_t s16;
|
||||||
|
typedef int32_t s32;
|
||||||
|
typedef int64_t s64;
|
||||||
|
|
||||||
|
|
||||||
|
#endif // SRC_DP_TYPES_H
|
Loading…
Reference in a new issue