本文整理汇总了C++中packet_header_create函数的典型用法代码示例。如果您正苦于以下问题:C++ packet_header_create函数的具体用法?C++ packet_header_create怎么用?C++ packet_header_create使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了packet_header_create函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: imu_set_quaternion_period
int imu_set_quaternion_period(IMU *imu, uint32_t period) {
SetQuaternionPeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), IMU_FUNCTION_SET_QUATERNION_PERIOD, imu->ipcon, imu);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(imu, (Packet *)&request, NULL);
return ret;
}
开发者ID:wopl,项目名称:fhem,代码行数:17,代码来源:brick_imu.c
示例2: imu_set_angular_velocity_period
int imu_set_angular_velocity_period(IMU *imu, uint32_t period) {
SetAngularVelocityPeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), IMU_FUNCTION_SET_ANGULAR_VELOCITY_PERIOD, imu->ipcon, imu);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(imu, (Packet *)&request, NULL);
return ret;
}
开发者ID:wopl,项目名称:fhem,代码行数:17,代码来源:brick_imu.c
示例3: imu_set_all_data_period
int imu_set_all_data_period(IMU *imu, uint32_t period) {
SetAllDataPeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), IMU_FUNCTION_SET_ALL_DATA_PERIOD, imu->ipcon, imu);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(imu, (Packet *)&request, NULL);
return ret;
}
开发者ID:wopl,项目名称:fhem,代码行数:17,代码来源:brick_imu.c
示例4: imu_set_magnetic_field_period
int imu_set_magnetic_field_period(IMU *imu, uint32_t period) {
SetMagneticFieldPeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), IMU_FUNCTION_SET_MAGNETIC_FIELD_PERIOD, imu->ipcon, imu);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(imu, (Packet *)&request, NULL);
return ret;
}
开发者ID:wopl,项目名称:fhem,代码行数:17,代码来源:brick_imu.c
示例5: uv_light_set_debounce_period
int uv_light_set_debounce_period(UVLight *uv_light, uint32_t debounce) {
DevicePrivate *device_p = uv_light->p;
SetDebouncePeriod_Request request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), UV_LIGHT_FUNCTION_SET_DEBOUNCE_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.debounce = leconvert_uint32_to(debounce);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:PlayWithIt,项目名称:TFStubserver,代码行数:17,代码来源:bricklet_uv_light.cpp
示例6: uv_light_set_uv_light_callback_period
int uv_light_set_uv_light_callback_period(UVLight *uv_light, uint32_t period) {
DevicePrivate *device_p = uv_light->p;
SetUVLightCallbackPeriod_Request request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), UV_LIGHT_FUNCTION_SET_UV_LIGHT_CALLBACK_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:PlayWithIt,项目名称:TFStubserver,代码行数:17,代码来源:bricklet_uv_light.cpp
示例7: imu_set_acceleration_range
int imu_set_acceleration_range(IMU *imu, uint8_t range) {
SetAccelerationRange_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), IMU_FUNCTION_SET_ACCELERATION_RANGE, imu->ipcon, imu);
if (ret < 0) {
return ret;
}
request.range = range;
ret = device_send_request(imu, (Packet *)&request, NULL);
return ret;
}
开发者ID:wopl,项目名称:fhem,代码行数:17,代码来源:brick_imu.c
示例8: imu_set_magnetometer_range
int imu_set_magnetometer_range(IMU *imu, uint8_t range) {
SetMagnetometerRange_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), IMU_FUNCTION_SET_MAGNETOMETER_RANGE, imu->ipcon, imu);
if (ret < 0) {
return ret;
}
request.range = range;
ret = device_send_request(imu, (Packet *)&request, NULL);
return ret;
}
开发者ID:wopl,项目名称:fhem,代码行数:17,代码来源:brick_imu.c
示例9: voltage_set_analog_value_callback_period
int voltage_set_analog_value_callback_period(Voltage *voltage, uint32_t period) {
DevicePrivate *device_p = voltage->p;
SetAnalogValueCallbackPeriod_Request request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), VOLTAGE_FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:PlayWithIt,项目名称:TFStubserver,代码行数:17,代码来源:bricklet_voltage.cpp
示例10: voltage_set_debounce_period
int voltage_set_debounce_period(Voltage *voltage, uint32_t debounce) {
DevicePrivate *device_p = voltage->p;
SetDebouncePeriod_Request request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), VOLTAGE_FUNCTION_SET_DEBOUNCE_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.debounce = leconvert_uint32_to(debounce);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:PlayWithIt,项目名称:TFStubserver,代码行数:17,代码来源:bricklet_voltage.cpp
示例11: gps_set_date_time_callback_period
int gps_set_date_time_callback_period(GPS *gps, uint32_t period) {
DevicePrivate *device_p = gps->p;
SetDateTimeCallbackPeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), GPS_FUNCTION_SET_DATE_TIME_CALLBACK_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:curiousTauseef,项目名称:macchina.io,代码行数:18,代码来源:bricklet_gps.c
示例12: gps_restart
int gps_restart(GPS *gps, uint8_t restart_type) {
DevicePrivate *device_p = gps->p;
Restart_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), GPS_FUNCTION_RESTART, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.restart_type = restart_type;
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:curiousTauseef,项目名称:macchina.io,代码行数:18,代码来源:bricklet_gps.c
示例13: ambient_light_v2_set_illuminance_callback_period
int ambient_light_v2_set_illuminance_callback_period(AmbientLightV2 *ambient_light_v2, uint32_t period) {
DevicePrivate *device_p = ambient_light_v2->p;
SetIlluminanceCallbackPeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), AMBIENT_LIGHT_V2_FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.period = leconvert_uint32_to(period);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:gus484,项目名称:ros-tinkerforge_sensors,代码行数:18,代码来源:bricklet_ambient_light_v2.c
示例14: led_strip_set_clock_frequency
int led_strip_set_clock_frequency(LEDStrip *led_strip, uint32_t frequency) {
DevicePrivate *device_p = led_strip->p;
SetClockFrequency_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), LED_STRIP_FUNCTION_SET_CLOCK_FREQUENCY, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.frequency = leconvert_uint32_to(frequency);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:curiousTauseef,项目名称:macchina.io,代码行数:18,代码来源:bricklet_led_strip.c
示例15: temperature_ir_set_debounce_period
int temperature_ir_set_debounce_period(TemperatureIR *temperature_ir, uint32_t debounce) {
DevicePrivate *device_p = temperature_ir->p;
SetDebouncePeriod_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), TEMPERATURE_IR_FUNCTION_SET_DEBOUNCE_PERIOD, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.debounce = leconvert_uint32_to(debounce);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:curiousTauseef,项目名称:macchina.io,代码行数:18,代码来源:bricklet_temperature_ir.c
示例16: temperature_ir_set_emissivity
int temperature_ir_set_emissivity(TemperatureIR *temperature_ir, uint16_t emissivity) {
DevicePrivate *device_p = temperature_ir->p;
SetEmissivity_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), TEMPERATURE_IR_FUNCTION_SET_EMISSIVITY, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.emissivity = leconvert_uint16_to(emissivity);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:curiousTauseef,项目名称:macchina.io,代码行数:18,代码来源:bricklet_temperature_ir.c
示例17: oled_128x64_write
int oled_128x64_write(OLED128x64 *oled_128x64, uint8_t data[64]) {
DevicePrivate *device_p = oled_128x64->p;
Write_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), OLED_128X64_FUNCTION_WRITE, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
memcpy(request.data, data, 64 * sizeof(uint8_t));
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:curiousTauseef,项目名称:macchina.io,代码行数:18,代码来源:bricklet_oled_128x64.c
示例18: analog_out_set_voltage
int analog_out_set_voltage(AnalogOut *analog_out, uint16_t voltage) {
DevicePrivate *device_p = analog_out->p;
SetVoltage_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), ANALOG_OUT_FUNCTION_SET_VOLTAGE, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.voltage = leconvert_uint16_to(voltage);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:JoneXie,项目名称:macchina.io,代码行数:18,代码来源:bricklet_analog_out.c
示例19: analog_out_set_mode
int analog_out_set_mode(AnalogOut *analog_out, uint8_t mode) {
DevicePrivate *device_p = analog_out->p;
SetMode_ request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), ANALOG_OUT_FUNCTION_SET_MODE, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.mode = mode;
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:JoneXie,项目名称:macchina.io,代码行数:18,代码来源:bricklet_analog_out.c
示例20: industrial_quad_relay_set_selected_values
int industrial_quad_relay_set_selected_values(IndustrialQuadRelay *industrial_quad_relay, uint16_t selection_mask, uint16_t value_mask) {
DevicePrivate *device_p = industrial_quad_relay->p;
SetSelectedValues_Request request;
int ret;
ret = packet_header_create(&request.header, sizeof(request), INDUSTRIAL_QUAD_RELAY_FUNCTION_SET_SELECTED_VALUES, device_p->ipcon_p, device_p);
if (ret < 0) {
return ret;
}
request.selection_mask = leconvert_uint16_to(selection_mask);
request.value_mask = leconvert_uint16_to(value_mask);
ret = device_send_request(device_p, (Packet *)&request, NULL);
return ret;
}
开发者ID:PlayWithIt,项目名称:TFStubserver,代码行数:18,代码来源:bricklet_industrial_quad_relay.cpp
注:本文中的packet_header_create函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论