C# Class BgApiDriver.BgApi

Datei anzeigen Open project: ahouben/BleDriver.NET

Protected Properties

Property Type Description
m_waitHandleResponse System.Threading.ManualResetEvent

Public Methods

Method Description
BgApi ( string port ) : System

Constructor.

Close ( ) : void

Closes the stream and serial port to a BLE device.

Open ( ) : void

Opens the connection to a bgapi device.

ble_cmd_attclient_attribute_write ( int connection, int atthandle, byte data ) : ble_msg_attclient_attribute_write_rsp_t
ble_cmd_attclient_execute_write ( int connection, int commit ) : ble_msg_attclient_execute_write_rsp_t
ble_cmd_attclient_find_by_type_value ( int connection, int start, int end, int uuid, byte value ) : ble_msg_attclient_find_by_type_value_rsp_t
ble_cmd_attclient_find_information ( int connection, int start, int end ) : ble_msg_attclient_find_information_rsp_t
ble_cmd_attclient_indicate_confirm ( int connection ) : ble_msg_attclient_indicate_confirm_rsp_t
ble_cmd_attclient_prepare_write ( int connection, int atthandle, int offset, byte data ) : ble_msg_attclient_prepare_write_rsp_t
ble_cmd_attclient_read_by_group_type ( int connection, int start, int end, byte uuid ) : ble_msg_attclient_read_by_group_type_rsp_t
ble_cmd_attclient_read_by_handle ( int connection, int chrhandle ) : ble_msg_attclient_read_by_handle_rsp_t
ble_cmd_attclient_read_by_type ( int connection, int start, int end, byte uuid ) : ble_msg_attclient_read_by_type_rsp_t
ble_cmd_attclient_read_long ( int connection, int chrhandle ) : ble_msg_attclient_read_long_rsp_t
ble_cmd_attclient_read_multiple ( int connection, byte handles ) : ble_msg_attclient_read_multiple_rsp_t
ble_cmd_attclient_write_command ( int connection, int atthandle, byte data ) : ble_msg_attclient_write_command_rsp_t
ble_cmd_attributes_read ( int handle, int offset ) : ble_msg_attributes_read_rsp_t
ble_cmd_attributes_read_type ( int handle ) : ble_msg_attributes_read_type_rsp_t
ble_cmd_attributes_send ( int connection, int handle, byte value ) : ble_msg_attributes_send_rsp_t
ble_cmd_attributes_user_read_response ( int connection, int att_error, byte value ) : void
ble_cmd_attributes_user_write_response ( int connection, int att_error ) : void
ble_cmd_attributes_write ( int handle, int offset, byte value ) : ble_msg_attributes_write_rsp_t
ble_cmd_connection_channel_map_get ( int connection ) : ble_msg_connection_channel_map_get_rsp_t
ble_cmd_connection_channel_map_set ( int connection, byte map ) : ble_msg_connection_channel_map_set_rsp_t
ble_cmd_connection_disconnect ( int connection ) : ble_msg_connection_disconnect_rsp_t
ble_cmd_connection_features_get ( int connection ) : ble_msg_connection_features_get_rsp_t
ble_cmd_connection_get_rssi ( int connection ) : ble_msg_connection_get_rssi_rsp_t
ble_cmd_connection_get_status ( int connection ) : ble_msg_connection_get_status_rsp_t
ble_cmd_connection_raw_tx ( int connection, byte data ) : ble_msg_connection_raw_tx_rsp_t
ble_cmd_connection_slave_latency_disable ( int disable ) : ble_msg_connection_slave_latency_disable_rsp_t
ble_cmd_connection_update ( int connection, int interval_min, int interval_max, int latency, int timeout ) : ble_msg_connection_update_rsp_t
ble_cmd_connection_version_update ( int connection ) : ble_msg_connection_version_update_rsp_t
ble_cmd_dfu_flash_set_address ( long address ) : ble_msg_dfu_flash_set_address_rsp_t
ble_cmd_dfu_flash_upload ( byte data ) : ble_msg_dfu_flash_upload_rsp_t
ble_cmd_dfu_flash_upload_finish ( ) : ble_msg_dfu_flash_upload_finish_rsp_t
ble_cmd_dfu_reset ( int dfu ) : void
ble_cmd_flash_erase_page ( int page ) : ble_msg_flash_erase_page_rsp_t
ble_cmd_flash_ps_defrag ( ) : void
ble_cmd_flash_ps_dump ( ) : void
ble_cmd_flash_ps_erase ( int key ) : void
ble_cmd_flash_ps_erase_all ( ) : void
ble_cmd_flash_ps_load ( int key ) : ble_msg_flash_ps_load_rsp_t
ble_cmd_flash_ps_save ( int key, byte value ) : ble_msg_flash_ps_save_rsp_t
ble_cmd_flash_read_data ( long address, int length ) : ble_msg_flash_read_data_rsp_t
ble_cmd_flash_write_data ( long address, byte data ) : ble_msg_flash_write_data_rsp_t
ble_cmd_gap_connect_direct ( bd_addr address, int addr_type, int conn_interval_min, int conn_interval_max, int timeout, int latency ) : ble_msg_gap_connect_direct_rsp_t
ble_cmd_gap_connect_selective ( int conn_interval_min, int conn_interval_max, int timeout, int latency ) : ble_msg_gap_connect_selective_rsp_t
ble_cmd_gap_discover ( int mode ) : ble_msg_gap_discover_rsp_t
ble_cmd_gap_end_procedure ( ) : ble_msg_gap_end_procedure_rsp_t
ble_cmd_gap_set_adv_data ( int set_scanrsp, byte adv_data ) : ble_msg_gap_set_adv_data_rsp_t
ble_cmd_gap_set_adv_parameters ( int adv_interval_min, int adv_interval_max, int adv_channels ) : ble_msg_gap_set_adv_parameters_rsp_t
ble_cmd_gap_set_directed_connectable_mode ( bd_addr address, int addr_type ) : ble_msg_gap_set_directed_connectable_mode_rsp_t
ble_cmd_gap_set_filtering ( int scan_policy, int adv_policy, int scan_duplicate_filtering ) : ble_msg_gap_set_filtering_rsp_t
ble_cmd_gap_set_initiating_con_parameters ( int scan_interval, int scan_window ) : ble_msg_gap_set_initiating_con_parameters_rsp_t
ble_cmd_gap_set_mode ( int discover, int connect ) : ble_msg_gap_set_mode_rsp_t
ble_cmd_gap_set_privacy_flags ( int peripheral_privacy, int central_privacy ) : void
ble_cmd_gap_set_scan_parameters ( int scan_interval, int scan_window, int active ) : ble_msg_gap_set_scan_parameters_rsp_t
ble_cmd_hardware_adc_read ( int input, int decimation, int reference_selection ) : ble_msg_hardware_adc_read_rsp_t
ble_cmd_hardware_analog_comparator_config_irq ( int enabled ) : ble_msg_hardware_analog_comparator_config_irq_rsp_t
ble_cmd_hardware_analog_comparator_enable ( int enable ) : void
ble_cmd_hardware_analog_comparator_read ( ) : ble_msg_hardware_analog_comparator_read_rsp_t
ble_cmd_hardware_i2c_read ( int address, int stop, int length ) : ble_msg_hardware_i2c_read_rsp_t
ble_cmd_hardware_i2c_write ( int address, int stop, byte data ) : ble_msg_hardware_i2c_write_rsp_t
ble_cmd_hardware_io_port_config_direction ( int port, int direction ) : ble_msg_hardware_io_port_config_direction_rsp_t
ble_cmd_hardware_io_port_config_function ( int port, int function ) : ble_msg_hardware_io_port_config_function_rsp_t
ble_cmd_hardware_io_port_config_irq ( int port, int enable_bits, int falling_edge ) : ble_msg_hardware_io_port_config_irq_rsp_t
ble_cmd_hardware_io_port_config_pull ( int port, int tristate_mask, int pull_up ) : ble_msg_hardware_io_port_config_pull_rsp_t
ble_cmd_hardware_io_port_irq_direction ( int port, int falling_edge ) : ble_msg_hardware_io_port_irq_direction_rsp_t
ble_cmd_hardware_io_port_irq_enable ( int port, int enable_bits ) : ble_msg_hardware_io_port_irq_enable_rsp_t
ble_cmd_hardware_io_port_read ( int port, int mask ) : ble_msg_hardware_io_port_read_rsp_t
ble_cmd_hardware_io_port_write ( int port, int mask, int data ) : ble_msg_hardware_io_port_write_rsp_t
ble_cmd_hardware_set_rxgain ( int gain ) : void
ble_cmd_hardware_set_soft_timer ( long time, int handle, int single_shot ) : ble_msg_hardware_set_soft_timer_rsp_t
ble_cmd_hardware_set_txpower ( int power ) : void
ble_cmd_hardware_spi_config ( int channel, int polarity, int phase, int bit_order, int baud_e, int baud_m ) : ble_msg_hardware_spi_config_rsp_t
ble_cmd_hardware_spi_transfer ( int channel, byte data ) : ble_msg_hardware_spi_transfer_rsp_t
ble_cmd_hardware_timer_comparator ( int timer, int channel, int mode, int comparator_value ) : ble_msg_hardware_timer_comparator_rsp_t
ble_cmd_hardware_usb_enable ( int enable ) : ble_msg_hardware_usb_enable_rsp_t
ble_cmd_sm_delete_bonding ( int handle ) : ble_msg_sm_delete_bonding_rsp_t
ble_cmd_sm_encrypt_start ( int handle, int bonding ) : ble_msg_sm_encrypt_start_rsp_t
ble_cmd_sm_get_bonds ( ) : ble_msg_sm_get_bonds_rsp_t
ble_cmd_sm_passkey_entry ( int handle, long passkey ) : ble_msg_sm_passkey_entry_rsp_t
ble_cmd_sm_set_bondable_mode ( int bondable ) : void
ble_cmd_sm_set_oob_data ( byte oob ) : void
ble_cmd_sm_set_parameters ( int mitm, int min_key_size, int io_capabilities ) : void
ble_cmd_sm_whitelist_bonds ( ) : ble_msg_sm_whitelist_bonds_rsp_t
ble_cmd_system_address_get ( ) : ble_msg_system_address_get_rsp_t
ble_cmd_system_aes_decrypt ( byte data ) : ble_msg_system_aes_decrypt_rsp_t
ble_cmd_system_aes_encrypt ( byte data ) : ble_msg_system_aes_encrypt_rsp_t
ble_cmd_system_aes_setkey ( byte key ) : void
ble_cmd_system_endpoint_rx ( int endpoint, int size ) : ble_msg_system_endpoint_rx_rsp_t
ble_cmd_system_endpoint_set_watermarks ( int endpoint, int rx, int tx ) : ble_msg_system_endpoint_set_watermarks_rsp_t
ble_cmd_system_endpoint_tx ( int endpoint, byte data ) : ble_msg_system_endpoint_tx_rsp_t
ble_cmd_system_get_connections ( ) : ble_msg_system_get_connections_rsp_t
ble_cmd_system_get_counters ( ) : ble_msg_system_get_counters_rsp_t
ble_cmd_system_get_info ( ) : ble_msg_system_get_info_rsp_t
ble_cmd_system_hello ( ) : void
ble_cmd_system_read_memory ( long address, int length ) : ble_msg_system_read_memory_rsp_t
ble_cmd_system_reg_read ( int address ) : ble_msg_system_reg_read_rsp_t
ble_cmd_system_reg_write ( int address, int value ) : ble_msg_system_reg_write_rsp_t
ble_cmd_system_reset ( int boot_in_dfu ) : void
ble_cmd_system_whitelist_append ( bd_addr address, int address_type ) : ble_msg_system_whitelist_append_rsp_t
ble_cmd_system_whitelist_clear ( ) : void
ble_cmd_system_whitelist_remove ( bd_addr address, int address_type ) : ble_msg_system_whitelist_remove_rsp_t
ble_cmd_test_channel_mode ( int mode ) : void
ble_cmd_test_debug ( int opcode, byte input ) : ble_msg_test_debug_rsp_t
ble_cmd_test_get_channel_map ( ) : ble_msg_test_get_channel_map_rsp_t
ble_cmd_test_phy_end ( ) : ble_msg_test_phy_end_rsp_t
ble_cmd_test_phy_reset ( ) : void
ble_cmd_test_phy_rx ( int channel ) : void
ble_cmd_test_phy_tx ( int channel, int length, int type ) : void

Protected Methods

Method Description
HandleEvent ( BgApiEvent evt ) : void
ble_evt_attclient_attribute_found ( ble_msg_attclient_attribute_found_evt_t arg ) : void
ble_evt_attclient_attribute_value ( ble_msg_attclient_attribute_value_evt_t arg ) : void
ble_evt_attclient_find_information_found ( ble_msg_attclient_find_information_found_evt_t arg ) : void
ble_evt_attclient_group_found ( ble_msg_attclient_group_found_evt_t arg ) : void
ble_evt_attclient_indicated ( ble_msg_attclient_indicated_evt_t arg ) : void
ble_evt_attclient_procedure_completed ( ble_msg_attclient_procedure_completed_evt_t arg ) : void
ble_evt_attclient_read_multiple_response ( ble_msg_attclient_read_multiple_response_evt_t arg ) : void
ble_evt_attributes_status ( ble_msg_attributes_status_evt_t arg ) : void
ble_evt_attributes_user_read_request ( ble_msg_attributes_user_read_request_evt_t arg ) : void
ble_evt_attributes_value ( ble_msg_attributes_value_evt_t arg ) : void
ble_evt_connection_disconnected ( ble_msg_connection_disconnected_evt_t arg ) : void
ble_evt_connection_feature_ind ( ble_msg_connection_feature_ind_evt_t arg ) : void
ble_evt_connection_raw_rx ( ble_msg_connection_raw_rx_evt_t arg ) : void
ble_evt_connection_status ( ble_msg_connection_status_evt_t arg ) : void
ble_evt_connection_version_ind ( ble_msg_connection_version_ind_evt_t arg ) : void
ble_evt_dfu_boot ( ble_msg_dfu_boot_evt_t arg ) : void
ble_evt_flash_ps_key ( ble_msg_flash_ps_key_evt_t arg ) : void
ble_evt_gap_mode_changed ( ble_msg_gap_mode_changed_evt_t arg ) : void
ble_evt_gap_scan_response ( ble_msg_gap_scan_response_evt_t arg ) : void
ble_evt_hardware_adc_result ( ble_msg_hardware_adc_result_evt_t arg ) : void
ble_evt_hardware_analog_comparator_status ( ble_msg_hardware_analog_comparator_status_evt_t arg ) : void
ble_evt_hardware_io_port_status ( ble_msg_hardware_io_port_status_evt_t arg ) : void
ble_evt_hardware_soft_timer ( ble_msg_hardware_soft_timer_evt_t arg ) : void
ble_evt_sm_bond_status ( ble_msg_sm_bond_status_evt_t arg ) : void
ble_evt_sm_bonding_fail ( ble_msg_sm_bonding_fail_evt_t arg ) : void
ble_evt_sm_passkey_display ( ble_msg_sm_passkey_display_evt_t arg ) : void
ble_evt_sm_passkey_request ( ble_msg_sm_passkey_request_evt_t arg ) : void
ble_evt_sm_smp_data ( ble_msg_sm_smp_data_evt_t arg ) : void
ble_evt_system_boot ( ble_msg_system_boot_evt_t arg ) : void
ble_evt_system_debug ( ble_msg_system_debug_evt_t arg ) : void
ble_evt_system_endpoint_watermark_rx ( ble_msg_system_endpoint_watermark_rx_evt_t arg ) : void
ble_evt_system_endpoint_watermark_tx ( ble_msg_system_endpoint_watermark_tx_evt_t arg ) : void
ble_evt_system_no_license_key ( ble_msg_system_no_license_key_evt_t arg ) : void
ble_evt_system_protocol_error ( ble_msg_system_protocol_error_evt_t arg ) : void
ble_evt_system_script_failure ( ble_msg_system_script_failure_evt_t arg ) : void
log ( string msg ) : void

All logging goes through this method for easy overriding.

parseEventResponse ( BgApiEventResponse received ) : BgApiEventResponse

Private Methods

Method Description
Send ( BgApiCommand command, bool no_return ) : BgApiResponse

Sends a command and receives a response from a ble device.

check ( int actual, int expected ) : void

Assert helper.

doOpen ( ) : void
m_serialPort_DataReceived ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void

Event handler for receiving data from the serial stream.

receive ( System.IO.Ports.SerialDataReceivedEventArgs e ) : void

Method Details

BgApi() public method

Constructor.
public BgApi ( string port ) : System
port string ex. "COM23"
return System

Close() public method

Closes the stream and serial port to a BLE device.
public Close ( ) : void
return void

HandleEvent() protected method

protected HandleEvent ( BgApiEvent evt ) : void
evt BgApiEvent
return void

Open() public method

Opens the connection to a bgapi device.
public Open ( ) : void
return void

ble_cmd_attclient_attribute_write() public method

public ble_cmd_attclient_attribute_write ( int connection, int atthandle, byte data ) : ble_msg_attclient_attribute_write_rsp_t
connection int
atthandle int
data byte
return ble_msg_attclient_attribute_write_rsp_t

ble_cmd_attclient_execute_write() public method

public ble_cmd_attclient_execute_write ( int connection, int commit ) : ble_msg_attclient_execute_write_rsp_t
connection int
commit int
return ble_msg_attclient_execute_write_rsp_t

ble_cmd_attclient_find_by_type_value() public method

public ble_cmd_attclient_find_by_type_value ( int connection, int start, int end, int uuid, byte value ) : ble_msg_attclient_find_by_type_value_rsp_t
connection int
start int
end int
uuid int
value byte
return ble_msg_attclient_find_by_type_value_rsp_t

ble_cmd_attclient_find_information() public method

public ble_cmd_attclient_find_information ( int connection, int start, int end ) : ble_msg_attclient_find_information_rsp_t
connection int
start int
end int
return ble_msg_attclient_find_information_rsp_t

ble_cmd_attclient_indicate_confirm() public method

public ble_cmd_attclient_indicate_confirm ( int connection ) : ble_msg_attclient_indicate_confirm_rsp_t
connection int
return ble_msg_attclient_indicate_confirm_rsp_t

ble_cmd_attclient_prepare_write() public method

public ble_cmd_attclient_prepare_write ( int connection, int atthandle, int offset, byte data ) : ble_msg_attclient_prepare_write_rsp_t
connection int
atthandle int
offset int
data byte
return ble_msg_attclient_prepare_write_rsp_t

ble_cmd_attclient_read_by_group_type() public method

public ble_cmd_attclient_read_by_group_type ( int connection, int start, int end, byte uuid ) : ble_msg_attclient_read_by_group_type_rsp_t
connection int
start int
end int
uuid byte
return ble_msg_attclient_read_by_group_type_rsp_t

ble_cmd_attclient_read_by_handle() public method

public ble_cmd_attclient_read_by_handle ( int connection, int chrhandle ) : ble_msg_attclient_read_by_handle_rsp_t
connection int
chrhandle int
return ble_msg_attclient_read_by_handle_rsp_t

ble_cmd_attclient_read_by_type() public method

public ble_cmd_attclient_read_by_type ( int connection, int start, int end, byte uuid ) : ble_msg_attclient_read_by_type_rsp_t
connection int
start int
end int
uuid byte
return ble_msg_attclient_read_by_type_rsp_t

ble_cmd_attclient_read_long() public method

public ble_cmd_attclient_read_long ( int connection, int chrhandle ) : ble_msg_attclient_read_long_rsp_t
connection int
chrhandle int
return ble_msg_attclient_read_long_rsp_t

ble_cmd_attclient_read_multiple() public method

public ble_cmd_attclient_read_multiple ( int connection, byte handles ) : ble_msg_attclient_read_multiple_rsp_t
connection int
handles byte
return ble_msg_attclient_read_multiple_rsp_t

ble_cmd_attclient_write_command() public method

public ble_cmd_attclient_write_command ( int connection, int atthandle, byte data ) : ble_msg_attclient_write_command_rsp_t
connection int
atthandle int
data byte
return ble_msg_attclient_write_command_rsp_t

ble_cmd_attributes_read() public method

public ble_cmd_attributes_read ( int handle, int offset ) : ble_msg_attributes_read_rsp_t
handle int
offset int
return ble_msg_attributes_read_rsp_t

ble_cmd_attributes_read_type() public method

public ble_cmd_attributes_read_type ( int handle ) : ble_msg_attributes_read_type_rsp_t
handle int
return ble_msg_attributes_read_type_rsp_t

ble_cmd_attributes_send() public method

public ble_cmd_attributes_send ( int connection, int handle, byte value ) : ble_msg_attributes_send_rsp_t
connection int
handle int
value byte
return ble_msg_attributes_send_rsp_t

ble_cmd_attributes_user_read_response() public method

public ble_cmd_attributes_user_read_response ( int connection, int att_error, byte value ) : void
connection int
att_error int
value byte
return void

ble_cmd_attributes_user_write_response() public method

public ble_cmd_attributes_user_write_response ( int connection, int att_error ) : void
connection int
att_error int
return void

ble_cmd_attributes_write() public method

public ble_cmd_attributes_write ( int handle, int offset, byte value ) : ble_msg_attributes_write_rsp_t
handle int
offset int
value byte
return ble_msg_attributes_write_rsp_t

ble_cmd_connection_channel_map_get() public method

public ble_cmd_connection_channel_map_get ( int connection ) : ble_msg_connection_channel_map_get_rsp_t
connection int
return ble_msg_connection_channel_map_get_rsp_t

ble_cmd_connection_channel_map_set() public method

public ble_cmd_connection_channel_map_set ( int connection, byte map ) : ble_msg_connection_channel_map_set_rsp_t
connection int
map byte
return ble_msg_connection_channel_map_set_rsp_t

ble_cmd_connection_disconnect() public method

public ble_cmd_connection_disconnect ( int connection ) : ble_msg_connection_disconnect_rsp_t
connection int
return ble_msg_connection_disconnect_rsp_t

ble_cmd_connection_features_get() public method

public ble_cmd_connection_features_get ( int connection ) : ble_msg_connection_features_get_rsp_t
connection int
return ble_msg_connection_features_get_rsp_t

ble_cmd_connection_get_rssi() public method

public ble_cmd_connection_get_rssi ( int connection ) : ble_msg_connection_get_rssi_rsp_t
connection int
return ble_msg_connection_get_rssi_rsp_t

ble_cmd_connection_get_status() public method

public ble_cmd_connection_get_status ( int connection ) : ble_msg_connection_get_status_rsp_t
connection int
return ble_msg_connection_get_status_rsp_t

ble_cmd_connection_raw_tx() public method

public ble_cmd_connection_raw_tx ( int connection, byte data ) : ble_msg_connection_raw_tx_rsp_t
connection int
data byte
return ble_msg_connection_raw_tx_rsp_t

ble_cmd_connection_slave_latency_disable() public method

public ble_cmd_connection_slave_latency_disable ( int disable ) : ble_msg_connection_slave_latency_disable_rsp_t
disable int
return ble_msg_connection_slave_latency_disable_rsp_t

ble_cmd_connection_update() public method

public ble_cmd_connection_update ( int connection, int interval_min, int interval_max, int latency, int timeout ) : ble_msg_connection_update_rsp_t
connection int
interval_min int
interval_max int
latency int
timeout int
return ble_msg_connection_update_rsp_t

ble_cmd_connection_version_update() public method

public ble_cmd_connection_version_update ( int connection ) : ble_msg_connection_version_update_rsp_t
connection int
return ble_msg_connection_version_update_rsp_t

ble_cmd_dfu_flash_set_address() public method

public ble_cmd_dfu_flash_set_address ( long address ) : ble_msg_dfu_flash_set_address_rsp_t
address long
return ble_msg_dfu_flash_set_address_rsp_t

ble_cmd_dfu_flash_upload() public method

public ble_cmd_dfu_flash_upload ( byte data ) : ble_msg_dfu_flash_upload_rsp_t
data byte
return ble_msg_dfu_flash_upload_rsp_t

ble_cmd_dfu_flash_upload_finish() public method

public ble_cmd_dfu_flash_upload_finish ( ) : ble_msg_dfu_flash_upload_finish_rsp_t
return ble_msg_dfu_flash_upload_finish_rsp_t

ble_cmd_dfu_reset() public method

public ble_cmd_dfu_reset ( int dfu ) : void
dfu int
return void

ble_cmd_flash_erase_page() public method

public ble_cmd_flash_erase_page ( int page ) : ble_msg_flash_erase_page_rsp_t
page int
return ble_msg_flash_erase_page_rsp_t

ble_cmd_flash_ps_defrag() public method

public ble_cmd_flash_ps_defrag ( ) : void
return void

ble_cmd_flash_ps_dump() public method

public ble_cmd_flash_ps_dump ( ) : void
return void

ble_cmd_flash_ps_erase() public method

public ble_cmd_flash_ps_erase ( int key ) : void
key int
return void

ble_cmd_flash_ps_erase_all() public method

public ble_cmd_flash_ps_erase_all ( ) : void
return void

ble_cmd_flash_ps_load() public method

public ble_cmd_flash_ps_load ( int key ) : ble_msg_flash_ps_load_rsp_t
key int
return ble_msg_flash_ps_load_rsp_t

ble_cmd_flash_ps_save() public method

public ble_cmd_flash_ps_save ( int key, byte value ) : ble_msg_flash_ps_save_rsp_t
key int
value byte
return ble_msg_flash_ps_save_rsp_t

ble_cmd_flash_read_data() public method

public ble_cmd_flash_read_data ( long address, int length ) : ble_msg_flash_read_data_rsp_t
address long
length int
return ble_msg_flash_read_data_rsp_t

ble_cmd_flash_write_data() public method

public ble_cmd_flash_write_data ( long address, byte data ) : ble_msg_flash_write_data_rsp_t
address long
data byte
return ble_msg_flash_write_data_rsp_t

ble_cmd_gap_connect_direct() public method

public ble_cmd_gap_connect_direct ( bd_addr address, int addr_type, int conn_interval_min, int conn_interval_max, int timeout, int latency ) : ble_msg_gap_connect_direct_rsp_t
address bd_addr
addr_type int
conn_interval_min int
conn_interval_max int
timeout int
latency int
return ble_msg_gap_connect_direct_rsp_t

ble_cmd_gap_connect_selective() public method

public ble_cmd_gap_connect_selective ( int conn_interval_min, int conn_interval_max, int timeout, int latency ) : ble_msg_gap_connect_selective_rsp_t
conn_interval_min int
conn_interval_max int
timeout int
latency int
return ble_msg_gap_connect_selective_rsp_t

ble_cmd_gap_discover() public method

public ble_cmd_gap_discover ( int mode ) : ble_msg_gap_discover_rsp_t
mode int
return ble_msg_gap_discover_rsp_t

ble_cmd_gap_end_procedure() public method

public ble_cmd_gap_end_procedure ( ) : ble_msg_gap_end_procedure_rsp_t
return ble_msg_gap_end_procedure_rsp_t

ble_cmd_gap_set_adv_data() public method

public ble_cmd_gap_set_adv_data ( int set_scanrsp, byte adv_data ) : ble_msg_gap_set_adv_data_rsp_t
set_scanrsp int
adv_data byte
return ble_msg_gap_set_adv_data_rsp_t

ble_cmd_gap_set_adv_parameters() public method

public ble_cmd_gap_set_adv_parameters ( int adv_interval_min, int adv_interval_max, int adv_channels ) : ble_msg_gap_set_adv_parameters_rsp_t
adv_interval_min int
adv_interval_max int
adv_channels int
return ble_msg_gap_set_adv_parameters_rsp_t

ble_cmd_gap_set_directed_connectable_mode() public method

public ble_cmd_gap_set_directed_connectable_mode ( bd_addr address, int addr_type ) : ble_msg_gap_set_directed_connectable_mode_rsp_t
address bd_addr
addr_type int
return ble_msg_gap_set_directed_connectable_mode_rsp_t

ble_cmd_gap_set_filtering() public method

public ble_cmd_gap_set_filtering ( int scan_policy, int adv_policy, int scan_duplicate_filtering ) : ble_msg_gap_set_filtering_rsp_t
scan_policy int
adv_policy int
scan_duplicate_filtering int
return ble_msg_gap_set_filtering_rsp_t

ble_cmd_gap_set_initiating_con_parameters() public method

public ble_cmd_gap_set_initiating_con_parameters ( int scan_interval, int scan_window ) : ble_msg_gap_set_initiating_con_parameters_rsp_t
scan_interval int
scan_window int
return ble_msg_gap_set_initiating_con_parameters_rsp_t

ble_cmd_gap_set_mode() public method

public ble_cmd_gap_set_mode ( int discover, int connect ) : ble_msg_gap_set_mode_rsp_t
discover int
connect int
return ble_msg_gap_set_mode_rsp_t

ble_cmd_gap_set_privacy_flags() public method

public ble_cmd_gap_set_privacy_flags ( int peripheral_privacy, int central_privacy ) : void
peripheral_privacy int
central_privacy int
return void

ble_cmd_gap_set_scan_parameters() public method

public ble_cmd_gap_set_scan_parameters ( int scan_interval, int scan_window, int active ) : ble_msg_gap_set_scan_parameters_rsp_t
scan_interval int
scan_window int
active int
return ble_msg_gap_set_scan_parameters_rsp_t

ble_cmd_hardware_adc_read() public method

public ble_cmd_hardware_adc_read ( int input, int decimation, int reference_selection ) : ble_msg_hardware_adc_read_rsp_t
input int
decimation int
reference_selection int
return ble_msg_hardware_adc_read_rsp_t

ble_cmd_hardware_analog_comparator_config_irq() public method

public ble_cmd_hardware_analog_comparator_config_irq ( int enabled ) : ble_msg_hardware_analog_comparator_config_irq_rsp_t
enabled int
return ble_msg_hardware_analog_comparator_config_irq_rsp_t

ble_cmd_hardware_analog_comparator_enable() public method

public ble_cmd_hardware_analog_comparator_enable ( int enable ) : void
enable int
return void

ble_cmd_hardware_analog_comparator_read() public method

public ble_cmd_hardware_analog_comparator_read ( ) : ble_msg_hardware_analog_comparator_read_rsp_t
return ble_msg_hardware_analog_comparator_read_rsp_t

ble_cmd_hardware_i2c_read() public method

public ble_cmd_hardware_i2c_read ( int address, int stop, int length ) : ble_msg_hardware_i2c_read_rsp_t
address int
stop int
length int
return ble_msg_hardware_i2c_read_rsp_t

ble_cmd_hardware_i2c_write() public method

public ble_cmd_hardware_i2c_write ( int address, int stop, byte data ) : ble_msg_hardware_i2c_write_rsp_t
address int
stop int
data byte
return ble_msg_hardware_i2c_write_rsp_t

ble_cmd_hardware_io_port_config_direction() public method

public ble_cmd_hardware_io_port_config_direction ( int port, int direction ) : ble_msg_hardware_io_port_config_direction_rsp_t
port int
direction int
return ble_msg_hardware_io_port_config_direction_rsp_t

ble_cmd_hardware_io_port_config_function() public method

public ble_cmd_hardware_io_port_config_function ( int port, int function ) : ble_msg_hardware_io_port_config_function_rsp_t
port int
function int
return ble_msg_hardware_io_port_config_function_rsp_t

ble_cmd_hardware_io_port_config_irq() public method

public ble_cmd_hardware_io_port_config_irq ( int port, int enable_bits, int falling_edge ) : ble_msg_hardware_io_port_config_irq_rsp_t
port int
enable_bits int
falling_edge int
return ble_msg_hardware_io_port_config_irq_rsp_t

ble_cmd_hardware_io_port_config_pull() public method

public ble_cmd_hardware_io_port_config_pull ( int port, int tristate_mask, int pull_up ) : ble_msg_hardware_io_port_config_pull_rsp_t
port int
tristate_mask int
pull_up int
return ble_msg_hardware_io_port_config_pull_rsp_t

ble_cmd_hardware_io_port_irq_direction() public method

public ble_cmd_hardware_io_port_irq_direction ( int port, int falling_edge ) : ble_msg_hardware_io_port_irq_direction_rsp_t
port int
falling_edge int
return ble_msg_hardware_io_port_irq_direction_rsp_t

ble_cmd_hardware_io_port_irq_enable() public method

public ble_cmd_hardware_io_port_irq_enable ( int port, int enable_bits ) : ble_msg_hardware_io_port_irq_enable_rsp_t
port int
enable_bits int
return ble_msg_hardware_io_port_irq_enable_rsp_t

ble_cmd_hardware_io_port_read() public method

public ble_cmd_hardware_io_port_read ( int port, int mask ) : ble_msg_hardware_io_port_read_rsp_t
port int
mask int
return ble_msg_hardware_io_port_read_rsp_t

ble_cmd_hardware_io_port_write() public method

public ble_cmd_hardware_io_port_write ( int port, int mask, int data ) : ble_msg_hardware_io_port_write_rsp_t
port int
mask int
data int
return ble_msg_hardware_io_port_write_rsp_t

ble_cmd_hardware_set_rxgain() public method

public ble_cmd_hardware_set_rxgain ( int gain ) : void
gain int
return void

ble_cmd_hardware_set_soft_timer() public method

public ble_cmd_hardware_set_soft_timer ( long time, int handle, int single_shot ) : ble_msg_hardware_set_soft_timer_rsp_t
time long
handle int
single_shot int
return ble_msg_hardware_set_soft_timer_rsp_t

ble_cmd_hardware_set_txpower() public method

public ble_cmd_hardware_set_txpower ( int power ) : void
power int
return void

ble_cmd_hardware_spi_config() public method

public ble_cmd_hardware_spi_config ( int channel, int polarity, int phase, int bit_order, int baud_e, int baud_m ) : ble_msg_hardware_spi_config_rsp_t
channel int
polarity int
phase int
bit_order int
baud_e int
baud_m int
return ble_msg_hardware_spi_config_rsp_t

ble_cmd_hardware_spi_transfer() public method

public ble_cmd_hardware_spi_transfer ( int channel, byte data ) : ble_msg_hardware_spi_transfer_rsp_t
channel int
data byte
return ble_msg_hardware_spi_transfer_rsp_t

ble_cmd_hardware_timer_comparator() public method

public ble_cmd_hardware_timer_comparator ( int timer, int channel, int mode, int comparator_value ) : ble_msg_hardware_timer_comparator_rsp_t
timer int
channel int
mode int
comparator_value int
return ble_msg_hardware_timer_comparator_rsp_t

ble_cmd_hardware_usb_enable() public method

public ble_cmd_hardware_usb_enable ( int enable ) : ble_msg_hardware_usb_enable_rsp_t
enable int
return ble_msg_hardware_usb_enable_rsp_t

ble_cmd_sm_delete_bonding() public method

public ble_cmd_sm_delete_bonding ( int handle ) : ble_msg_sm_delete_bonding_rsp_t
handle int
return ble_msg_sm_delete_bonding_rsp_t

ble_cmd_sm_encrypt_start() public method

public ble_cmd_sm_encrypt_start ( int handle, int bonding ) : ble_msg_sm_encrypt_start_rsp_t
handle int
bonding int
return ble_msg_sm_encrypt_start_rsp_t

ble_cmd_sm_get_bonds() public method

public ble_cmd_sm_get_bonds ( ) : ble_msg_sm_get_bonds_rsp_t
return ble_msg_sm_get_bonds_rsp_t

ble_cmd_sm_passkey_entry() public method

public ble_cmd_sm_passkey_entry ( int handle, long passkey ) : ble_msg_sm_passkey_entry_rsp_t
handle int
passkey long
return ble_msg_sm_passkey_entry_rsp_t

ble_cmd_sm_set_bondable_mode() public method

public ble_cmd_sm_set_bondable_mode ( int bondable ) : void
bondable int
return void

ble_cmd_sm_set_oob_data() public method

public ble_cmd_sm_set_oob_data ( byte oob ) : void
oob byte
return void

ble_cmd_sm_set_parameters() public method

public ble_cmd_sm_set_parameters ( int mitm, int min_key_size, int io_capabilities ) : void
mitm int
min_key_size int
io_capabilities int
return void

ble_cmd_sm_whitelist_bonds() public method

public ble_cmd_sm_whitelist_bonds ( ) : ble_msg_sm_whitelist_bonds_rsp_t
return ble_msg_sm_whitelist_bonds_rsp_t

ble_cmd_system_address_get() public method

public ble_cmd_system_address_get ( ) : ble_msg_system_address_get_rsp_t
return ble_msg_system_address_get_rsp_t

ble_cmd_system_aes_decrypt() public method

public ble_cmd_system_aes_decrypt ( byte data ) : ble_msg_system_aes_decrypt_rsp_t
data byte
return ble_msg_system_aes_decrypt_rsp_t

ble_cmd_system_aes_encrypt() public method

public ble_cmd_system_aes_encrypt ( byte data ) : ble_msg_system_aes_encrypt_rsp_t
data byte
return ble_msg_system_aes_encrypt_rsp_t

ble_cmd_system_aes_setkey() public method

public ble_cmd_system_aes_setkey ( byte key ) : void
key byte
return void

ble_cmd_system_endpoint_rx() public method

public ble_cmd_system_endpoint_rx ( int endpoint, int size ) : ble_msg_system_endpoint_rx_rsp_t
endpoint int
size int
return ble_msg_system_endpoint_rx_rsp_t

ble_cmd_system_endpoint_set_watermarks() public method

public ble_cmd_system_endpoint_set_watermarks ( int endpoint, int rx, int tx ) : ble_msg_system_endpoint_set_watermarks_rsp_t
endpoint int
rx int
tx int
return ble_msg_system_endpoint_set_watermarks_rsp_t

ble_cmd_system_endpoint_tx() public method

public ble_cmd_system_endpoint_tx ( int endpoint, byte data ) : ble_msg_system_endpoint_tx_rsp_t
endpoint int
data byte
return ble_msg_system_endpoint_tx_rsp_t

ble_cmd_system_get_connections() public method

public ble_cmd_system_get_connections ( ) : ble_msg_system_get_connections_rsp_t
return ble_msg_system_get_connections_rsp_t

ble_cmd_system_get_counters() public method

public ble_cmd_system_get_counters ( ) : ble_msg_system_get_counters_rsp_t
return ble_msg_system_get_counters_rsp_t

ble_cmd_system_get_info() public method

public ble_cmd_system_get_info ( ) : ble_msg_system_get_info_rsp_t
return ble_msg_system_get_info_rsp_t

ble_cmd_system_hello() public method

public ble_cmd_system_hello ( ) : void
return void

ble_cmd_system_read_memory() public method

public ble_cmd_system_read_memory ( long address, int length ) : ble_msg_system_read_memory_rsp_t
address long
length int
return ble_msg_system_read_memory_rsp_t

ble_cmd_system_reg_read() public method

public ble_cmd_system_reg_read ( int address ) : ble_msg_system_reg_read_rsp_t
address int
return ble_msg_system_reg_read_rsp_t

ble_cmd_system_reg_write() public method

public ble_cmd_system_reg_write ( int address, int value ) : ble_msg_system_reg_write_rsp_t
address int
value int
return ble_msg_system_reg_write_rsp_t

ble_cmd_system_reset() public method

public ble_cmd_system_reset ( int boot_in_dfu ) : void
boot_in_dfu int
return void

ble_cmd_system_whitelist_append() public method

public ble_cmd_system_whitelist_append ( bd_addr address, int address_type ) : ble_msg_system_whitelist_append_rsp_t
address bd_addr
address_type int
return ble_msg_system_whitelist_append_rsp_t

ble_cmd_system_whitelist_clear() public method

public ble_cmd_system_whitelist_clear ( ) : void
return void

ble_cmd_system_whitelist_remove() public method

public ble_cmd_system_whitelist_remove ( bd_addr address, int address_type ) : ble_msg_system_whitelist_remove_rsp_t
address bd_addr
address_type int
return ble_msg_system_whitelist_remove_rsp_t

ble_cmd_test_channel_mode() public method

public ble_cmd_test_channel_mode ( int mode ) : void
mode int
return void

ble_cmd_test_debug() public method

public ble_cmd_test_debug ( int opcode, byte input ) : ble_msg_test_debug_rsp_t
opcode int
input byte
return ble_msg_test_debug_rsp_t

ble_cmd_test_get_channel_map() public method

public ble_cmd_test_get_channel_map ( ) : ble_msg_test_get_channel_map_rsp_t
return ble_msg_test_get_channel_map_rsp_t

ble_cmd_test_phy_end() public method

public ble_cmd_test_phy_end ( ) : ble_msg_test_phy_end_rsp_t
return ble_msg_test_phy_end_rsp_t

ble_cmd_test_phy_reset() public method

public ble_cmd_test_phy_reset ( ) : void
return void

ble_cmd_test_phy_rx() public method

public ble_cmd_test_phy_rx ( int channel ) : void
channel int
return void

ble_cmd_test_phy_tx() public method

public ble_cmd_test_phy_tx ( int channel, int length, int type ) : void
channel int
length int
type int
return void

ble_evt_attclient_attribute_found() protected method

protected ble_evt_attclient_attribute_found ( ble_msg_attclient_attribute_found_evt_t arg ) : void
arg ble_msg_attclient_attribute_found_evt_t
return void

ble_evt_attclient_attribute_value() protected method

protected ble_evt_attclient_attribute_value ( ble_msg_attclient_attribute_value_evt_t arg ) : void
arg ble_msg_attclient_attribute_value_evt_t
return void

ble_evt_attclient_find_information_found() protected method

protected ble_evt_attclient_find_information_found ( ble_msg_attclient_find_information_found_evt_t arg ) : void
arg ble_msg_attclient_find_information_found_evt_t
return void

ble_evt_attclient_group_found() protected method

protected ble_evt_attclient_group_found ( ble_msg_attclient_group_found_evt_t arg ) : void
arg ble_msg_attclient_group_found_evt_t
return void

ble_evt_attclient_indicated() protected method

protected ble_evt_attclient_indicated ( ble_msg_attclient_indicated_evt_t arg ) : void
arg ble_msg_attclient_indicated_evt_t
return void

ble_evt_attclient_procedure_completed() protected method

protected ble_evt_attclient_procedure_completed ( ble_msg_attclient_procedure_completed_evt_t arg ) : void
arg ble_msg_attclient_procedure_completed_evt_t
return void

ble_evt_attclient_read_multiple_response() protected method

protected ble_evt_attclient_read_multiple_response ( ble_msg_attclient_read_multiple_response_evt_t arg ) : void
arg ble_msg_attclient_read_multiple_response_evt_t
return void

ble_evt_attributes_status() protected method

protected ble_evt_attributes_status ( ble_msg_attributes_status_evt_t arg ) : void
arg ble_msg_attributes_status_evt_t
return void

ble_evt_attributes_user_read_request() protected method

protected ble_evt_attributes_user_read_request ( ble_msg_attributes_user_read_request_evt_t arg ) : void
arg ble_msg_attributes_user_read_request_evt_t
return void

ble_evt_attributes_value() protected method

protected ble_evt_attributes_value ( ble_msg_attributes_value_evt_t arg ) : void
arg ble_msg_attributes_value_evt_t
return void

ble_evt_connection_disconnected() protected method

protected ble_evt_connection_disconnected ( ble_msg_connection_disconnected_evt_t arg ) : void
arg ble_msg_connection_disconnected_evt_t
return void

ble_evt_connection_feature_ind() protected method

protected ble_evt_connection_feature_ind ( ble_msg_connection_feature_ind_evt_t arg ) : void
arg ble_msg_connection_feature_ind_evt_t
return void

ble_evt_connection_raw_rx() protected method

protected ble_evt_connection_raw_rx ( ble_msg_connection_raw_rx_evt_t arg ) : void
arg ble_msg_connection_raw_rx_evt_t
return void

ble_evt_connection_status() protected method

protected ble_evt_connection_status ( ble_msg_connection_status_evt_t arg ) : void
arg ble_msg_connection_status_evt_t
return void

ble_evt_connection_version_ind() protected method

protected ble_evt_connection_version_ind ( ble_msg_connection_version_ind_evt_t arg ) : void
arg ble_msg_connection_version_ind_evt_t
return void

ble_evt_dfu_boot() protected method

protected ble_evt_dfu_boot ( ble_msg_dfu_boot_evt_t arg ) : void
arg ble_msg_dfu_boot_evt_t
return void

ble_evt_flash_ps_key() protected method

protected ble_evt_flash_ps_key ( ble_msg_flash_ps_key_evt_t arg ) : void
arg ble_msg_flash_ps_key_evt_t
return void

ble_evt_gap_mode_changed() protected method

protected ble_evt_gap_mode_changed ( ble_msg_gap_mode_changed_evt_t arg ) : void
arg ble_msg_gap_mode_changed_evt_t
return void

ble_evt_gap_scan_response() protected method

protected ble_evt_gap_scan_response ( ble_msg_gap_scan_response_evt_t arg ) : void
arg ble_msg_gap_scan_response_evt_t
return void

ble_evt_hardware_adc_result() protected method

protected ble_evt_hardware_adc_result ( ble_msg_hardware_adc_result_evt_t arg ) : void
arg ble_msg_hardware_adc_result_evt_t
return void

ble_evt_hardware_analog_comparator_status() protected method

protected ble_evt_hardware_analog_comparator_status ( ble_msg_hardware_analog_comparator_status_evt_t arg ) : void
arg ble_msg_hardware_analog_comparator_status_evt_t
return void

ble_evt_hardware_io_port_status() protected method

protected ble_evt_hardware_io_port_status ( ble_msg_hardware_io_port_status_evt_t arg ) : void
arg ble_msg_hardware_io_port_status_evt_t
return void

ble_evt_hardware_soft_timer() protected method

protected ble_evt_hardware_soft_timer ( ble_msg_hardware_soft_timer_evt_t arg ) : void
arg ble_msg_hardware_soft_timer_evt_t
return void

ble_evt_sm_bond_status() protected method

protected ble_evt_sm_bond_status ( ble_msg_sm_bond_status_evt_t arg ) : void
arg ble_msg_sm_bond_status_evt_t
return void

ble_evt_sm_bonding_fail() protected method

protected ble_evt_sm_bonding_fail ( ble_msg_sm_bonding_fail_evt_t arg ) : void
arg ble_msg_sm_bonding_fail_evt_t
return void

ble_evt_sm_passkey_display() protected method

protected ble_evt_sm_passkey_display ( ble_msg_sm_passkey_display_evt_t arg ) : void
arg ble_msg_sm_passkey_display_evt_t
return void

ble_evt_sm_passkey_request() protected method

protected ble_evt_sm_passkey_request ( ble_msg_sm_passkey_request_evt_t arg ) : void
arg ble_msg_sm_passkey_request_evt_t
return void

ble_evt_sm_smp_data() protected method

protected ble_evt_sm_smp_data ( ble_msg_sm_smp_data_evt_t arg ) : void
arg ble_msg_sm_smp_data_evt_t
return void

ble_evt_system_boot() protected method

protected ble_evt_system_boot ( ble_msg_system_boot_evt_t arg ) : void
arg ble_msg_system_boot_evt_t
return void

ble_evt_system_debug() protected method

protected ble_evt_system_debug ( ble_msg_system_debug_evt_t arg ) : void
arg ble_msg_system_debug_evt_t
return void

ble_evt_system_endpoint_watermark_rx() protected method

protected ble_evt_system_endpoint_watermark_rx ( ble_msg_system_endpoint_watermark_rx_evt_t arg ) : void
arg ble_msg_system_endpoint_watermark_rx_evt_t
return void

ble_evt_system_endpoint_watermark_tx() protected method

protected ble_evt_system_endpoint_watermark_tx ( ble_msg_system_endpoint_watermark_tx_evt_t arg ) : void
arg ble_msg_system_endpoint_watermark_tx_evt_t
return void

ble_evt_system_no_license_key() protected method

protected ble_evt_system_no_license_key ( ble_msg_system_no_license_key_evt_t arg ) : void
arg ble_msg_system_no_license_key_evt_t
return void

ble_evt_system_protocol_error() protected method

protected ble_evt_system_protocol_error ( ble_msg_system_protocol_error_evt_t arg ) : void
arg ble_msg_system_protocol_error_evt_t
return void

ble_evt_system_script_failure() protected method

protected ble_evt_system_script_failure ( ble_msg_system_script_failure_evt_t arg ) : void
arg ble_msg_system_script_failure_evt_t
return void

log() protected method

All logging goes through this method for easy overriding.
protected log ( string msg ) : void
msg string The message to log.
return void

parseEventResponse() protected method

protected parseEventResponse ( BgApiEventResponse received ) : BgApiEventResponse
received BgApiEventResponse
return BgApiEventResponse

Property Details

m_waitHandleResponse protected_oe property

Wait handle for a response from the ble device.
protected ManualResetEvent,System.Threading m_waitHandleResponse
return System.Threading.ManualResetEvent