AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
|
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <stdint.h>
#include "sensors.h"
#include "player_nfc.h"
#include "nfc.pb-c.h"
#include "buffer_sizes.h"
#include "socket.h"
#include "amqp_listen.h"
#include "config_env.h"
#include "logger.h"
#include <pthread.h>
Go to the source code of this file.
Data Structures | |
struct | BT_HDR |
Macros | |
#define | NCI_BRCM_CO_ID 0x2E |
#define | NCI_MSG_HDR_SIZE 3 /* per NCI spec */ |
#define | NCI_DATA_HDR_SIZE 3 /* per NCI spec */ |
#define | NCI_MAX_PAYLOAD_SIZE 0xFE |
#define | NCI_MAX_CTRL_SIZE 0xFF /* max control message size */ |
#define | NCI_CTRL_INIT_SIZE 32 /* initial NFCC control payload size */ |
#define | NCI_MAX_VSC_SIZE 0xFF |
#define | NCI_VSC_MSG_HDR_SIZE 12 /* NCI header (3) + callback function pointer(8; use 8 to be safe) + HCIT (1 byte) */ |
#define | NCI_TL_SIZE 2 |
#define | NCI_ISO_DEP_MAX_INFO |
#define | NCI_NFC_DEP_MAX_DATA 251 /* Max payload (254) - Protocol Header (3) in NFC-DEP, DID and NAD are not used */ |
#define | NCI_MT_MASK 0xE0 |
#define | NCI_MT_SHIFT 5 |
#define | NCI_MT_DATA 0x00 |
#define | NCI_MT_CMD 1 /* (NCI_MT_CMD << NCI_MT_SHIFT) = 0x20 */ |
#define | NCI_MT_RSP 2 /* (NCI_MT_RSP << NCI_MT_SHIFT) = 0x40 */ |
#define | NCI_MT_NTF 3 /* (NCI_MT_NTF << NCI_MT_SHIFT) = 0x60 */ |
#define | NCI_MT_CFG 4 /* (NCI_MT_CFG << NCI_MT_SHIFT) = 0x80 */ |
#define | NCI_MTS_CMD 0x20 |
#define | NCI_MTS_RSP 0x40 |
#define | NCI_MTS_NTF 0x60 |
#define | NCI_MTS_CFG 0x80 |
#define | NCI_NTF_BIT 0x80 /* the tNFC_VS_EVT is a notification */ |
#define | NCI_RSP_BIT 0x40 /* the tNFC_VS_EVT is a response */ |
#define | NCI_LS_DATA 0x00 |
#define | NCI_LS_DATA_PBF 0x01 |
#define | NCI_PBF_MASK 0x10 |
#define | NCI_PBF_SHIFT 4 |
#define | NCI_PBF_NO_OR_LAST 0x00 /* not fragmented or last fragment */ |
#define | NCI_PBF_ST_CONT 0x10 /* start or continuing fragment */ |
#define | NCI_GID_MASK 0x0F |
#define | NCI_GID_SHIFT 0 |
#define | NCI_GID_CORE 0x00 /* 0000b NCI Core group */ |
#define | NCI_GID_RF_MANAGE 0x01 /* 0001b RF Management group */ |
#define | NCI_GID_EE_MANAGE 0x02 /* 0010b NFCEE Management group */ |
#define | NCI_GID_PROP 0x0F /* 1111b Proprietary */ |
#define | NCI_OID_MASK 0x3F |
#define | NCI_OID_SHIFT 0 |
#define | NCI_DH_ID 0 /* for DH */ |
#define | NCI_TEST_ID 0xFE /* for loopback test */ |
#define | NCI_DEST_TYPE_NFCC 1 /* NFCC - loopback */ |
#define | NCI_DEST_TYPE_REMOTE 2 /* Remote NFC Endpoint */ |
#define | NCI_DEST_TYPE_NFCEE 3 /* NFCEE */ |
#define | NCI_MSG_BLD_HDR0(p, mt, gid) *(p)++ = (uint8_t)(((mt) << NCI_MT_SHIFT) | (gid)); |
#define | NCI_MSG_PBLD_HDR0(p, mt, pbf, gid) *(p)++ = (uint8_t)(((mt) << NCI_MT_SHIFT) | ((pbf) << NCI_PBF_SHIFT) | (gid)); |
#define | NCI_MSG_BLD_HDR1(p, oid) *(p)++ = (uint8_t)(((oid) << NCI_OID_SHIFT)); |
#define | NCI_MSG_PRS_HDR0(p, mt, pbf, gid) |
#define | NCI_MSG_PRS_MT_PBF(p, mt, pbf) |
#define | NCI_MSG_PRS_HDR1(p, oid) |
#define | NCI_CID_MASK 0x0F |
#define | NCI_DATA_BLD_HDR(p, cid, len) |
#define | NCI_DATA_PBLD_HDR(p, pbf, cid, len) |
#define | NCI_DATA_PRS_HDR(p, pbf, cid, len) |
#define | BE_STREAM_TO_uint32_t(u32, p) |
#define | NFA_TNF_EMPTY NDEF_TNF_EMPTY /* Empty or no type specified */ |
#define | NFA_TNF_WKT NDEF_TNF_WKT /* NFC Forum well-known type [NFC RTD] */ |
#define | NFA_TNF_RFC2046_MEDIA NDEF_TNF_MEDIA /* Media-type as defined in RFC 2046 [RFC 2046] */ |
#define | NFA_TNF_RFC3986_URI NDEF_TNF_URI /* Absolute URI as defined in RFC 3986 [RFC 3986] */ |
#define | NFA_TNF_EXTERNAL NDEF_TNF_EXT /* NFC Forum external type [NFC RTD] */ |
#define | NFA_TNF_UNKNOWN case NDEF_TNF_UNKNOWN /* Unknown */ |
#define | NFA_TNF_UNCHANGED NDEF_TNF_UNCHANGED /* Unchanged */ |
#define | NFA_TNF_RESERVED NDEF_TNF_RESERVED /* Reserved */ |
#define | NFA_TNF_DEFAULT case 0xFF /* Used to register default NDEF type handler */ |
#define | NDEF_MB_MASK 0x80 /* Message Begin */ |
#define | NDEF_ME_MASK 0x40 /* Message End */ |
#define | NDEF_CF_MASK 0x20 /* Chunk Flag */ |
#define | NDEF_SR_MASK 0x10 /* Short Record */ |
#define | NDEF_IL_MASK 0x08 /* ID Length */ |
#define | NDEF_TNF_MASK 0x07 /* Type Name Format */ |
#define | NDEF_TNF_EMPTY 0 /* Empty (type/id/payload len =0) */ |
#define | NDEF_TNF_WKT 1 /* NFC Forum well-known type/RTD */ |
#define | NDEF_TNF_MEDIA 2 /* Media-type as defined in RFC 2046 */ |
#define | NDEF_TNF_URI 3 /* Absolute URI as defined in RFC 3986 */ |
#define | NDEF_TNF_EXT 4 /* NFC Forum external type/RTD */ |
#define | NDEF_TNF_UNKNOWN 5 /* Unknown (type len =0) */ |
#define | NDEF_TNF_UNCHANGED 6 /* Unchanged (type len =0) */ |
#define | NDEF_TNF_RESERVED 7 /* Reserved */ |
Typedefs | |
typedef uint8_t | tNDEF_STATUS |
typedef uint8_t | tNFA_TNF |
Functions | |
void | createBufNdef_TypeURI (uint8_t *strIN, int sizLen, uint8_t *strOUT) |
void | createBufNdef_TypeText (uint8_t *strIN, int sizLen, uint8_t *strOUT) |
void | createBufNdef_TypeSmartPoster (uint8_t *strIN, uint8_t *strIN2, int sizLen, uint8_t *strOUT) |
void | vshort_actidata (uint8_t *strIN, int sizLen, uint8_t *strOUT) |
void | vshort_sendata (uint8_t *strIN, int sizLen, uint8_t *strOUT) |
int | codeNFC (NfcPayload *nfcData, uint8_t *msg) |
uint8_t * | NDEF_RecGetType (uint8_t *p_rec, uint8_t *p_tnf, uint8_t *p_type_len) |
uint8_t * | NDEF_RecGetId (uint8_t *p_rec, uint8_t *p_id_len) |
uint8_t * | NDEF_RecGetPayload (uint8_t *p_rec, uint32_t *p_payload_len) |
tNDEF_STATUS | NDEF_MsgValidate (uint8_t *p_msg, uint32_t msg_len, int b_allow_chunks) |
#define BE_STREAM_TO_uint32_t | ( | u32, | |
p | |||
) |
Definition at line 148 of file mockVMLibNci.h.
#define NCI_BRCM_CO_ID 0x2E |
Definition at line 20 of file mockVMLibNci.h.
#define NCI_CID_MASK 0x0F |
Definition at line 126 of file mockVMLibNci.h.
#define NCI_CTRL_INIT_SIZE 32 /* initial NFCC control payload size */ |
Definition at line 28 of file mockVMLibNci.h.
#define NCI_DATA_BLD_HDR | ( | p, | |
cid, | |||
len | |||
) |
Definition at line 129 of file mockVMLibNci.h.
#define NCI_DATA_HDR_SIZE 3 /* per NCI spec */ |
Definition at line 25 of file mockVMLibNci.h.
#define NCI_DATA_PBLD_HDR | ( | p, | |
pbf, | |||
cid, | |||
len | |||
) |
Definition at line 134 of file mockVMLibNci.h.
#define NCI_DATA_PRS_HDR | ( | p, | |
pbf, | |||
cid, | |||
len | |||
) |
Definition at line 139 of file mockVMLibNci.h.
#define NCI_DEST_TYPE_NFCC 1 /* NFCC - loopback */ |
Definition at line 92 of file mockVMLibNci.h.
#define NCI_DEST_TYPE_NFCEE 3 /* NFCEE */ |
Definition at line 94 of file mockVMLibNci.h.
#define NCI_DEST_TYPE_REMOTE 2 /* Remote NFC Endpoint */ |
Definition at line 93 of file mockVMLibNci.h.
#define NCI_DH_ID 0 /* for DH */ |
Definition at line 87 of file mockVMLibNci.h.
#define NCI_GID_CORE 0x00 /* 0000b NCI Core group */ |
Definition at line 76 of file mockVMLibNci.h.
#define NCI_GID_EE_MANAGE 0x02 /* 0010b NFCEE Management group */ |
Definition at line 78 of file mockVMLibNci.h.
#define NCI_GID_MASK 0x0F |
Definition at line 74 of file mockVMLibNci.h.
#define NCI_GID_PROP 0x0F /* 1111b Proprietary */ |
Definition at line 79 of file mockVMLibNci.h.
#define NCI_GID_RF_MANAGE 0x01 /* 0001b RF Management group */ |
Definition at line 77 of file mockVMLibNci.h.
#define NCI_GID_SHIFT 0 |
Definition at line 75 of file mockVMLibNci.h.
#define NCI_ISO_DEP_MAX_INFO |
Definition at line 34 of file mockVMLibNci.h.
#define NCI_LS_DATA 0x00 |
Definition at line 64 of file mockVMLibNci.h.
#define NCI_LS_DATA_PBF 0x01 |
Definition at line 65 of file mockVMLibNci.h.
#define NCI_MAX_CTRL_SIZE 0xFF /* max control message size */ |
Definition at line 27 of file mockVMLibNci.h.
#define NCI_MAX_PAYLOAD_SIZE 0xFE |
Definition at line 26 of file mockVMLibNci.h.
#define NCI_MAX_VSC_SIZE 0xFF |
Definition at line 29 of file mockVMLibNci.h.
#define NCI_MSG_BLD_HDR0 | ( | p, | |
mt, | |||
gid | |||
) | *(p)++ = (uint8_t)(((mt) << NCI_MT_SHIFT) | (gid)); |
Definition at line 97 of file mockVMLibNci.h.
#define NCI_MSG_BLD_HDR1 | ( | p, | |
oid | |||
) | *(p)++ = (uint8_t)(((oid) << NCI_OID_SHIFT)); |
Definition at line 103 of file mockVMLibNci.h.
#define NCI_MSG_HDR_SIZE 3 /* per NCI spec */ |
Definition at line 24 of file mockVMLibNci.h.
#define NCI_MSG_PBLD_HDR0 | ( | p, | |
mt, | |||
pbf, | |||
gid | |||
) | *(p)++ = (uint8_t)(((mt) << NCI_MT_SHIFT) | ((pbf) << NCI_PBF_SHIFT) | (gid)); |
Definition at line 99 of file mockVMLibNci.h.
#define NCI_MSG_PRS_HDR0 | ( | p, | |
mt, | |||
pbf, | |||
gid | |||
) |
Definition at line 106 of file mockVMLibNci.h.
#define NCI_MSG_PRS_HDR1 | ( | p, | |
oid | |||
) |
Definition at line 117 of file mockVMLibNci.h.
#define NCI_MSG_PRS_MT_PBF | ( | p, | |
mt, | |||
pbf | |||
) |
Definition at line 112 of file mockVMLibNci.h.
#define NCI_MT_CFG 4 /* (NCI_MT_CFG << NCI_MT_SHIFT) = 0x80 */ |
Definition at line 52 of file mockVMLibNci.h.
#define NCI_MT_CMD 1 /* (NCI_MT_CMD << NCI_MT_SHIFT) = 0x20 */ |
Definition at line 49 of file mockVMLibNci.h.
#define NCI_MT_DATA 0x00 |
Definition at line 48 of file mockVMLibNci.h.
#define NCI_MT_MASK 0xE0 |
Definition at line 46 of file mockVMLibNci.h.
#define NCI_MT_NTF 3 /* (NCI_MT_NTF << NCI_MT_SHIFT) = 0x60 */ |
Definition at line 51 of file mockVMLibNci.h.
#define NCI_MT_RSP 2 /* (NCI_MT_RSP << NCI_MT_SHIFT) = 0x40 */ |
Definition at line 50 of file mockVMLibNci.h.
#define NCI_MT_SHIFT 5 |
Definition at line 47 of file mockVMLibNci.h.
#define NCI_MTS_CFG 0x80 |
Definition at line 57 of file mockVMLibNci.h.
#define NCI_MTS_CMD 0x20 |
Definition at line 54 of file mockVMLibNci.h.
#define NCI_MTS_NTF 0x60 |
Definition at line 56 of file mockVMLibNci.h.
#define NCI_MTS_RSP 0x40 |
Definition at line 55 of file mockVMLibNci.h.
#define NCI_NFC_DEP_MAX_DATA 251 /* Max payload (254) - Protocol Header (3) in NFC-DEP, DID and NAD are not used */ |
Definition at line 37 of file mockVMLibNci.h.
#define NCI_NTF_BIT 0x80 /* the tNFC_VS_EVT is a notification */ |
Definition at line 59 of file mockVMLibNci.h.
#define NCI_OID_MASK 0x3F |
Definition at line 83 of file mockVMLibNci.h.
#define NCI_OID_SHIFT 0 |
Definition at line 84 of file mockVMLibNci.h.
#define NCI_PBF_MASK 0x10 |
Definition at line 68 of file mockVMLibNci.h.
#define NCI_PBF_NO_OR_LAST 0x00 /* not fragmented or last fragment */ |
Definition at line 70 of file mockVMLibNci.h.
#define NCI_PBF_SHIFT 4 |
Definition at line 69 of file mockVMLibNci.h.
#define NCI_PBF_ST_CONT 0x10 /* start or continuing fragment */ |
Definition at line 71 of file mockVMLibNci.h.
#define NCI_RSP_BIT 0x40 /* the tNFC_VS_EVT is a response */ |
Definition at line 60 of file mockVMLibNci.h.
#define NCI_TEST_ID 0xFE /* for loopback test */ |
Definition at line 89 of file mockVMLibNci.h.
#define NCI_TL_SIZE 2 |
Definition at line 32 of file mockVMLibNci.h.
#define NCI_VSC_MSG_HDR_SIZE 12 /* NCI header (3) + callback function pointer(8; use 8 to be safe) + HCIT (1 byte) */ |
Definition at line 30 of file mockVMLibNci.h.
#define NDEF_CF_MASK 0x20 /* Chunk Flag */ |
Definition at line 196 of file mockVMLibNci.h.
#define NDEF_IL_MASK 0x08 /* ID Length */ |
Definition at line 198 of file mockVMLibNci.h.
#define NDEF_MB_MASK 0x80 /* Message Begin */ |
Definition at line 194 of file mockVMLibNci.h.
#define NDEF_ME_MASK 0x40 /* Message End */ |
Definition at line 195 of file mockVMLibNci.h.
#define NDEF_SR_MASK 0x10 /* Short Record */ |
Definition at line 197 of file mockVMLibNci.h.
#define NDEF_TNF_EMPTY 0 /* Empty (type/id/payload len =0) */ |
Definition at line 202 of file mockVMLibNci.h.
#define NDEF_TNF_EXT 4 /* NFC Forum external type/RTD */ |
Definition at line 206 of file mockVMLibNci.h.
#define NDEF_TNF_MASK 0x07 /* Type Name Format */ |
Definition at line 199 of file mockVMLibNci.h.
#define NDEF_TNF_MEDIA 2 /* Media-type as defined in RFC 2046 */ |
Definition at line 204 of file mockVMLibNci.h.
#define NDEF_TNF_RESERVED 7 /* Reserved */ |
Definition at line 209 of file mockVMLibNci.h.
#define NDEF_TNF_UNCHANGED 6 /* Unchanged (type len =0) */ |
Definition at line 208 of file mockVMLibNci.h.
#define NDEF_TNF_UNKNOWN 5 /* Unknown (type len =0) */ |
Definition at line 207 of file mockVMLibNci.h.
#define NDEF_TNF_URI 3 /* Absolute URI as defined in RFC 3986 */ |
Definition at line 205 of file mockVMLibNci.h.
#define NDEF_TNF_WKT 1 /* NFC Forum well-known type/RTD */ |
Definition at line 203 of file mockVMLibNci.h.
#define NFA_TNF_DEFAULT case 0xFF /* Used to register default NDEF type handler */ |
Definition at line 191 of file mockVMLibNci.h.
#define NFA_TNF_EMPTY NDEF_TNF_EMPTY /* Empty or no type specified */ |
Definition at line 183 of file mockVMLibNci.h.
#define NFA_TNF_EXTERNAL NDEF_TNF_EXT /* NFC Forum external type [NFC RTD] */ |
Definition at line 187 of file mockVMLibNci.h.
#define NFA_TNF_RESERVED NDEF_TNF_RESERVED /* Reserved */ |
Definition at line 190 of file mockVMLibNci.h.
#define NFA_TNF_RFC2046_MEDIA NDEF_TNF_MEDIA /* Media-type as defined in RFC 2046 [RFC 2046] */ |
Definition at line 185 of file mockVMLibNci.h.
#define NFA_TNF_RFC3986_URI NDEF_TNF_URI /* Absolute URI as defined in RFC 3986 [RFC 3986] */ |
Definition at line 186 of file mockVMLibNci.h.
#define NFA_TNF_UNCHANGED NDEF_TNF_UNCHANGED /* Unchanged */ |
Definition at line 189 of file mockVMLibNci.h.
#define NFA_TNF_UNKNOWN case NDEF_TNF_UNKNOWN /* Unknown */ |
Definition at line 188 of file mockVMLibNci.h.
#define NFA_TNF_WKT NDEF_TNF_WKT /* NFC Forum well-known type [NFC RTD] */ |
Definition at line 184 of file mockVMLibNci.h.
typedef uint8_t tNDEF_STATUS |
Definition at line 180 of file mockVMLibNci.h.
typedef uint8_t tNFA_TNF |
Definition at line 192 of file mockVMLibNci.h.
anonymous enum |
Definition at line 165 of file mockVMLibNci.h.
int codeNFC | ( | NfcPayload * | nfcData, |
uint8_t * | msg | ||
) |
Definition at line 145 of file mockVMLibNci.c.
void createBufNdef_TypeSmartPoster | ( | uint8_t * | strIN, |
uint8_t * | strIN2, | ||
int | sizLen, | ||
uint8_t * | strOUT | ||
) |
void createBufNdef_TypeText | ( | uint8_t * | strIN, |
int | sizLen, | ||
uint8_t * | strOUT | ||
) |
void createBufNdef_TypeURI | ( | uint8_t * | strIN, |
int | sizLen, | ||
uint8_t * | strOUT | ||
) |
tNDEF_STATUS NDEF_MsgValidate | ( | uint8_t * | p_msg, |
uint32_t | msg_len, | ||
int | b_allow_chunks | ||
) |
Definition at line 333 of file mockVMLibNci.c.
uint8_t* NDEF_RecGetId | ( | uint8_t * | p_rec, |
uint8_t * | p_id_len | ||
) |
uint8_t* NDEF_RecGetPayload | ( | uint8_t * | p_rec, |
uint32_t * | p_payload_len | ||
) |
uint8_t* NDEF_RecGetType | ( | uint8_t * | p_rec, |
uint8_t * | p_tnf, | ||
uint8_t * | p_type_len | ||
) |
void vshort_actidata | ( | uint8_t * | strIN, |
int | sizLen, | ||
uint8_t * | strOUT | ||
) |
void vshort_sendata | ( | uint8_t * | strIN, |
int | sizLen, | ||
uint8_t * | strOUT | ||
) |