blatann.examples.peripheral_current_time_service module¶
This example demonstrates using Bluetooth SIG’s defined Current Time service as a peripheral.
- blatann.examples.peripheral_current_time_service.on_connect(peer, event_args)¶
Event callback for when a central device connects to us
- Parameters
peer (blatann.peer.Client) – The peer that connected to us
event_args – None
- blatann.examples.peripheral_current_time_service.on_disconnect(peer, event_args)¶
Event callback for when the client disconnects from us (or when we disconnect from the client)
- Parameters
peer (blatann.peer.Client) – The peer that disconnected
event_args (blatann.event_args.DisconnectionEventArgs) – The event args
- blatann.examples.peripheral_current_time_service.on_current_time_write(characteristic, event_args)¶
Callback registered to be triggered whenever the Current Time characteristic is written to
- Parameters
characteristic –
event_args (blatann.event_args.DecodedWriteEventArgs) – The write event args
- blatann.examples.peripheral_current_time_service.on_local_time_info_write(characteristic, event_args)¶
Callback registered to be triggered whenever the Local Time Info characteristic is written to
- Parameters
characteristic –
event_args (blatann.event_args.DecodedWriteEventArgs) – The write event args
- blatann.examples.peripheral_current_time_service.main(serial_port)¶