#ifndef _CIS_ASYN_ENTRY_H_ | |
#define _CIS_ASYN_ENTRY_H_ | |
#include "../ciscore/cis_api.h" | |
typedef struct st_sample_object | |
{ | |
cis_oid_t oid; | |
cis_instcount_t instCount; | |
const char* instBitmap; | |
const cis_rid_t* attrListPtr; | |
uint16_t attrCount; | |
const cis_rid_t* actListPtr; | |
uint16_t actCount; | |
}st_sample_object; | |
typedef enum | |
{ | |
digital_input_state = 5500, | |
digital_input_counter, | |
digital_input_polarity, | |
digital_input_debounce, | |
digital_input_edge_selection, | |
digital_input_counter_reset, | |
current_time, | |
fractional_time, | |
min_x_value, | |
max_x_value, | |
min_y_value, | |
max_y_value, | |
min_z_value, | |
max_z_value, | |
latitude, | |
longitude, | |
uncertainty, | |
velocity, | |
timestamp, | |
min_limit, | |
max_limit, | |
delay_duration, | |
clip, | |
trigger, | |
duration, | |
minimum_off_time, | |
mode, | |
text, | |
x_coordinate, | |
y_coordinate, | |
clear_display, | |
contrast, | |
increase_input_state, | |
decrease_input_state, | |
counter, | |
current_position = 5536, | |
transition_time, | |
remaining_time, | |
up_counter = 5541, | |
down_counter, | |
digital_state, | |
cumulative_time, | |
max_x_coordinate, | |
max_y_coordinate, | |
multi_state_input, | |
level, | |
digital_output_state = 5550, | |
digital_output_polarity, | |
analog_input_state = 5600, | |
min_measured_value, | |
max_measured_value, | |
min_range_value, | |
max_range_value, | |
reset_min_and_max_measured_values, | |
analog_output_current_value = 5650, | |
sensor_value = 5700, | |
sensor_units, | |
x_value, | |
y_value, | |
z_value, | |
compass_direction, | |
colour, | |
application_type = 5750, | |
sensor_type, | |
instantaneous_active_power = 5800, | |
min_measured_active_power, | |
max_measured_active_power, | |
min_range_active_power, | |
max_range_active_power, | |
cumulative_active_power, | |
active_power_calibration, | |
instantaneous_reactive_power = 5810, | |
min_measured_reactive_power, | |
max_measured_reactive_power, | |
min_range_reactive_power, | |
max_range_reactive_power, | |
cumulative_reactive_power, | |
reactive_power_calibration, | |
power_factor = 5820, | |
current_calibration, | |
reset_cumulative_energy, | |
event_identifier, | |
start_time, | |
duration_in_min, | |
criticality_level, | |
avg_load_adj_pct, | |
duty_cycle, | |
on_off = 5850, | |
dimmer, | |
on_time, | |
muti_state_output, | |
off_time, | |
set_point_value = 5900, | |
busy_to_clear_delay = 5903, | |
clear_to_busy_delay, | |
bitmap_input = 5910, | |
bitmap_input_reset, | |
element_description, | |
uuid, | |
resource_id_max | |
}et_resource_id_t; | |
int utils_findDataType(cis_data_t * dataP); | |
void init_lwm2m(); | |
enum MIPL_PRIM | |
{ | |
MIPL_GET_M2M_VERSION_REQ, | |
MIPL_GET_M2M_VERSION_CNF, | |
MIPL_SET_M2M_DEFAULT_CONFIG_REQ, | |
MIPL_SET_M2M_CONFIG_REQ, | |
MIPL_SET_M2M_CONFIG_CNF, | |
MIPL_DEL_M2M_CONFIG_REQ, | |
MIPL_DEL_M2M_CONFIG_CNF, | |
MIPL_ADD_M2M_OBJ_REQ, | |
MIPL_ADD_M2M_OBJ_CNF, | |
MIPL_DEL_M2M_OBJ_REQ, | |
MIPL_DEL_M2M_OBJ_CNF=10, | |
MIPL_OPEN_M2M_REG_REQ, | |
MIPL_OPEN_M2M_REG_CNF, | |
MIPL_CLOSE_M2M_REG_REQ, | |
MIPL_CLOSE_M2M_REG_CNF, | |
MIPL_UPDATE_M2M_REG_REQ, | |
MIPL_UPDATE_M2M_REG_CNF, | |
MIPL_DISCOVER_M2M_RSP_REQ, | |
MIPL_DISCOVER_M2M_RSP_CNF, | |
MIPL_READ_M2M_RSP_REQ, | |
MIPL_READ_M2M_RSP_CNF=20, | |
MIPL_WRITE_M2M_RSP_REQ, | |
MIPL_WRITE_M2M_RSP_CNF, | |
MIPL_EXEC_M2M_RSP_REQ, | |
MIPL_EXEC_M2M_RSP_CNF, | |
MIPL_PARAM_M2M_RSP_REQ, | |
MIPL_PARAM_M2M_RSP_CNF, | |
MIPL_OBSERVE_M2M_RSP_REQ, | |
MIPL_OBSERVE_M2M_RSP_CNF, | |
MIPL_NOTIFY_M2M_RSP_REQ, | |
MIPL_NOTIFY_M2M_RSP_CNF=30, | |
MIPL_TRIGGER_M2M_HANDLE_PACKET_REQ, | |
MIPL_READ_M2M_IND, | |
MIPL_WRITE_M2M_IND, | |
MIPL_EXEC_M2M_IND, | |
MIPL_PARAM_M2M_IND, | |
MIPL_EVENT_M2M_IND, | |
MIPL_OBSERVE_M2M_IND, | |
MIPL_DISCOVER_M2M_IND, | |
}; | |
typedef enum LWM2MRC { | |
LWM2MRC_SUCCESS = 0, | |
MIPLRS_205_CONTENT=1, | |
MIPLRS_204_CHANGED=2, | |
MIPLRS_400_BAD_REQUEST = 11, | |
MIPLRS_401_UNAUTHORIZED = 12, | |
MIPLRS_404_NOT_FOUND = 13, | |
MIPLRS_405_METHOD_NOT_ALLOWED = 14, | |
MIPLRS_406_NOT_ACCEPTABLE = 15, | |
LWM2MRC_FAIL = 100 | |
} Lwm2mReturnCode; | |
struct miplContext | |
{ | |
UINT8 ref; | |
UINT8 register_flag; | |
UINT8 config_flag; | |
UINT16 config_size; | |
CHAR *config; | |
struct timeval g_lifetime_last; | |
UINT32 g_lifetime; | |
UINT32 g_dm_lifetime_last; | |
UINT32 g_dm_lifetime; | |
UINT8 dm_status;//0--not init,1---init | |
UINT8 IMEI[20]; | |
UINT8 IMSI[20]; | |
pthread_mutex_t mutex; | |
pthread_cond_t cond; | |
}; | |
struct lwm2m_usock_head{ | |
int msgId; | |
int msgLen; | |
void * msgData; | |
}; | |
#endif |