![]() |
BSB Developer Docs
|
API for Matter service on u5. More...
#include "matter_common.h"#include <time.h>#include <core/string.h>#include <core/pubsub.h>#include <core/state.h>Go to the source code of this file.
Data Structures | |
| struct | MatterCommissioningEvent |
Event of type MatterEventTypeCommissioning More... | |
| struct | MatterEvent |
| Complete service event. More... | |
| struct | MatterCommissionedFabrics |
| Commissioning information struct. More... | |
| struct | MatterCertificationConfig |
| Structure describing certification declaration settings. More... | |
Macros | |
| #define | RECORD_MATTER "matter" |
Typedefs | |
| typedef struct Matter | Matter |
Enumerations | |
| enum | MatterEventType { MatterEventTypeCommissioning , MatterEventTypeFabricCountChanged , MatterEventTypeWillReboot } |
| Type of service event. | |
| enum | MatterCertificationType { MatterCertificationTypeProduction , MatterCertificationTypeDevelopment , MatterCertificationTypeProvisional , MatterCertificationTypeMax } |
| Enumeration of available certification types. More... | |
| enum | MatterReboot { MatterRebootAutomatically , MatterRebootManually } |
Functions | |
| FuriPubSub * | matter_get_pubsub (Matter *instance) |
| Get a PubSub to listen to Matter events. | |
| FuriState * | matter_get_switch_state (Matter *instance) |
| Get the switch state object that supports change notifications. | |
| MatterStatus | matter_set_switch_state (Matter *instance, MatterSwitchState switch_state) |
| Set the state of the Matter switch. | |
| MatterStatus | matter_set_switch_startup_mode (Matter *instance, MatterSwitchStartupMode mode) |
| Set the startup mode of the Matter switch. | |
| MatterStatus | matter_enable_commissioning (Matter *instance, MatterCommissioningInfo *info) |
| Enable Matter commissioning (open the commissioning window). | |
| MatterStatus | matter_get_commissioned_fabrics (Matter *instance, MatterCommissionedFabrics *fabrics) |
| Get the brief information about the commissioning status. | |
| MatterStatus | matter_factory_reset (Matter *instance, MatterReboot reboot) |
| Delete all Matter pairing data, then reboot on success. | |
| MatterStatus | matter_set_certification_config (Matter *instance, MatterCertificationType cert_type) |
| Set the preferred certification config. | |
| MatterStatus | matter_get_certification_config (Matter *instance, MatterCertificationConfig *cert_config) |
| Get the certification configuration, including preferred and actual configs. | |
API for Matter service on u5.
Enumeration of available certification types.
| MatterStatus matter_enable_commissioning | ( | Matter * | instance, |
| MatterCommissioningInfo * | info ) |
Enable Matter commissioning (open the commissioning window).
| [in,out] | instance | pointer to the service instance |
| [out] | info | pointer to the object to contain the information about the current commissioning window |
MatterStatusOk on success, any other value from MatterStatus enum on error | MatterStatus matter_factory_reset | ( | Matter * | instance, |
| MatterReboot | reboot ) |
Delete all Matter pairing data, then reboot on success.
| [in,out] | instance | pointer to the service instance |
| [in] | reboot | reboot mode, see MatterReboot enum |
MatterStatus enum on error. MatterStatusOk is never returned. | MatterStatus matter_get_certification_config | ( | Matter * | instance, |
| MatterCertificationConfig * | cert_config ) |
Get the certification configuration, including preferred and actual configs.
| [in,out] | instance | pointer to the service instance |
| [out] | cert_config | pointer to the object to contain the config (must be allocated) |
MatterStatusOk on success, any other value from MatterStatus enum on error | MatterStatus matter_get_commissioned_fabrics | ( | Matter * | instance, |
| MatterCommissionedFabrics * | fabrics ) |
Get the brief information about the commissioning status.
| [in,out] | instance | pointer to the service instance |
| [out] | fabrics | pointer to the object to contain the information about commissioned fabrics |
MatterStatusOk on success, any other value from MatterStatus enum on error | FuriPubSub * matter_get_pubsub | ( | Matter * | instance | ) |
Get a PubSub to listen to Matter events.
The returned FuriPubSub object will have an underlying type of MatterEvent. Use furi_pubsub_subscribe() to get notifications about new events.
| [in,out] | instance | pointer to the service instance |
| FuriState * matter_get_switch_state | ( | Matter * | instance | ) |
Get the switch state object that supports change notifications.
The returned FuriState object will have an underlying type of MatterSwitchState. Use furi_state_subscribe() to get notifications about changes in the current switch state.
This function never blocks.
| [in,out] | instance | pointer to the service instance |
| MatterStatus matter_set_certification_config | ( | Matter * | instance, |
| MatterCertificationType | cert_type ) |
Set the preferred certification config.
| [in,out] | instance | pointer to the service instance |
| [in] | cert_type | value corresponding to the preferred certification type |
MatterStatusOk on success, any other value from MatterStatus enum on error | MatterStatus matter_set_switch_startup_mode | ( | Matter * | instance, |
| MatterSwitchStartupMode | mode ) |
Set the startup mode of the Matter switch.
| [in,out] | instance | pointer to the service instance |
| [in] | mode | required Matter switch startup mode |
MatterStatusOk on success, any other value from MatterStatus enum on error | MatterStatus matter_set_switch_state | ( | Matter * | instance, |
| MatterSwitchState | switch_state ) |
Set the state of the Matter switch.
MatterSwitchStateUnknown as switch_state does nothing.| [in,out] | instance | pointer to the service instance |
| [in] | switch_state | required Matter switch state |
MatterStatusOk on success, any other value from MatterStatus enum on error