#[repr(C)]pub struct indigo_device {Show 17 fields
pub name: [c_char; 128],
pub lock: indigo_glock,
pub is_remote: bool,
pub gp_bits: u16,
pub device_context: *mut c_void,
pub private_data: *mut c_void,
pub master_device: *mut indigo_device,
pub last_result: indigo_result,
pub version: indigo_version,
pub access_token: indigo_token,
pub match_patterns: *mut c_void,
pub match_patterns_count: c_int,
pub attach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>,
pub enumerate_properties: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>,
pub change_property: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>,
pub enable_blob: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property, mode: indigo_enable_blob_mode) -> indigo_result>,
pub detach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>,
}Expand description
Device structure definition
Fields§
§name: [c_char; 128]< device name
lock: indigo_glock< device global lock
is_remote: bool< is remote device
gp_bits: u16< general purpose bits for driver specific usage
device_context: *mut c_void< any device specific data
private_data: *mut c_void< private data
master_device: *mut indigo_device< if the device provides many logical devices, this must point to one of the locical devices, otherwise is safe to be NULL
last_result: indigo_result< result of last bus operation
version: indigo_version< device version
access_token: indigo_token< allow change request with correct access token only
match_patterns: *mut c_void< device matching patterns
match_patterns_count: c_int< device matching patterns count
attach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>callback called when device is attached to bus
enumerate_properties: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>callback called when client broadcast enumerate properties request on bus, device and name elements of property can be set NULL to address all
change_property: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>callback called when client broadcast property change request
enable_blob: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property, mode: indigo_enable_blob_mode) -> indigo_result>callback called when client broadcast enableBLOB mode change request
detach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>callback called when device is detached from the bus