nl:: Weave:: Warm
This namespace includes interfaces for the Weave Address and Routing Module, a portable Module for configuring Weave IP addresses and Routes.
Summary
Typedefs |
|
---|---|
ActionFunction)(ActionType inAction, bool inActivate, const uint64_t &inGlobalId, const uint64_t &inInterfaceId)
|
typedef |
FlagsType
|
typedefuint16_t
|
Variables |
|
---|---|
kGlobalULAPrefixLength = 48
|
const uint8_t
|
kLegacy6LoWPANULAAddressPrefixLength = 64
|
const uint8_t
|
kThreadULAAddressPrefixLength = 64
|
const uint8_t
|
kTunnelAddressPrefixLength = 128
|
const uint8_t
|
kWiFiULAAddressPrefixLength = 64
|
const uint8_t
|
sFabricStateDelegate
|
|
sState
|
Functions |
|
---|---|
BorderRouterStateChange(InterfaceState inState)
|
void
A WARM API called to announce a State change for the Border router feature.
|
CellularInterfaceStateChange(InterfaceState inState)
|
void
A WARM API called to announce a State change for the Cellular interface.
|
FabricStateChange(InterfaceState inState)
|
void
A function called to announce a State change for the Weave Fabric feature.
|
GetCurrentActionState(ActionType inAction)
|
bool
A static function that returns the current State of a specified action.
|
GetFabricState(const WeaveFabricState *& outFabricState)
|
A WARM API to acquire the FabricState object that was provided to Warm during Init.
|
GetSystemFeatureState(SystemFeatureType inSystemFeature)
|
bool
A static function that gets the current State of a System feature.
|
GetULA(InterfaceType inInterfaceType, Inet::IPAddress & outAddress)
|
A WARM API to acquire a ULA for a specified interface type.
|
Init(WeaveFabricState & inFabricState)
|
A WARM API to perform one time module initialization.
|
InvokeActions(void)
|
void
A WARM API called by a dedicated task to perform various platform API actions.
|
LegacyHostAddressAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
LegacyThreadAddressAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
MakePrefix(const uint64_t & inGlobalID, const uint16_t subnetId, const uint8_t inPrefixLen, Inet::IPPrefix & outPrefix)
|
void
A utility to construct a 48 bit prefix from a globalID.
|
MapAvailabilityToPriority(Profiles::WeaveTunnel::Platform::TunnelAvailabilityMode inAvailability)
|
A static function that returns a mapping from TunnelAvailability to RoutePriority.
|
RecordPlatformResult(PlatformResult inResult, ActionType inAction, bool inActionState)
|
A static function that records the result of a platform API Action call.
|
ReportActionComplete(PlatformResult inResult)
|
void
A WARM API called to announce the completion of a previous asynchronous platform API call.
|
SetCurrentActionState(ActionType inAction, bool inValue)
|
void
A static function that sets the current State of a specified action.
|
SetSystemFeatureState(SystemFeatureType inSystemFeature, bool inValue)
|
bool
A static function that sets the current State of the System Feature.
|
ShouldPerformAction(ActionType inAction, FlagsType inNecessarySystemFeatureState, bool & outActivate)
|
bool
A static function that determines whether the specified action should be performed.
|
SystemFeatureStateChangeHandler(SystemFeatureType inSystemFeatureType, bool inState)
|
void
A static function that Sets the System Feature state and notifies the platform that event state has changed.
|
TakeActions(void)
|
void
A static function that tests the State of each action and makes a platform API call to change the action State if necessary.
|
ThreadAdvertisementAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
ThreadHostAddressAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
ThreadHostRouteAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
ThreadInterfaceStateChange(InterfaceState inState)
|
void
A WARM API called to announce a State change for the Thread interface.
|
ThreadRoutePriorityAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
ThreadRoutingStateChange(InterfaceState inState)
|
void
A WARM API called to announce a State change for the Thread Routing feature.
|
ThreadThreadAddressAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
ThreadThreadRouteAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
TunnelHostAddressAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
TunnelHostRouteAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
TunnelInterfaceStateChange(InterfaceState inState)
|
void
A WARM API called to announce a State change for the Weave Tunnel interface.
|
TunnelPriorityStateChange(nl::Weave::Profiles::WeaveTunnel::Platform::TunnelAvailabilityMode inAvailability)
|
void
A WARM API called to update the priority of the Tunnel Service.
|
TunnelServiceStateChange(InterfaceState inState, nl::Weave::Profiles::WeaveTunnel::Platform::TunnelAvailabilityMode inAvailability)
|
void
A WARM API called to announce a State change for the Weave Tunnel interface.
|
WiFiHostAddressAction(ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId)
|
One of the Action methods.
|
WiFiInterfaceStateChange(InterfaceState inState)
|
void
A WARM API called to announce a State change for the WiFi interface.
|
Classes |
|
---|---|
nl:: |
This is an internal class to WarmCore. |
Structs |
|
---|---|
nl:: |
|
nl:: |
Namespaces |
|
---|---|
nl:: |
Enumerations
ActionType
ActionType
InitState
InitState
InterfaceState
InterfaceState
An enum of possible Interface State values.
InterfaceType
InterfaceType
PlatformActionExecution
PlatformActionExecution
PlatformResult
PlatformResult
RoutePriority
RoutePriority
An enum of possible route priorities so that one route can be given priority over another.
SystemFeatureType
SystemFeatureType
Typedefs
ActionFunction
PlatformResult(* ActionFunction)(ActionType inAction, bool inActivate, const uint64_t &inGlobalId, const uint64_t &inInterfaceId)
FlagsType
uint16_t FlagsType
Variables
kGlobalULAPrefixLength
const uint8_t kGlobalULAPrefixLength = 48
kLegacy6LoWPANULAAddressPrefixLength
const uint8_t kLegacy6LoWPANULAAddressPrefixLength = 64
kThreadULAAddressPrefixLength
const uint8_t kThreadULAAddressPrefixLength = 64
kTunnelAddressPrefixLength
const uint8_t kTunnelAddressPrefixLength = 128
kWiFiULAAddressPrefixLength
const uint8_t kWiFiULAAddressPrefixLength = 64
sFabricStateDelegate
WarmFabricStateDelegate sFabricStateDelegate
sState
ModuleState sState
Functions
BorderRouterStateChange
void BorderRouterStateChange( InterfaceState inState )
A WARM API called to announce a State change for the Border router feature.
Details | |||
---|---|---|---|
Parameters |
|
CellularInterfaceStateChange
void CellularInterfaceStateChange( InterfaceState inState )
A WARM API called to announce a State change for the Cellular interface.
Details | |||
---|---|---|---|
Parameters |
|
FabricStateChange
void FabricStateChange( InterfaceState inState )
A function called to announce a State change for the Weave Fabric feature.
Details | |||
---|---|---|---|
Parameters |
|
GetCurrentActionState
bool GetCurrentActionState( ActionType inAction )
A static function that returns the current State of a specified action.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the action is Set, false otherwise.
|
GetFabricState
WEAVE_ERROR GetFabricState( const WeaveFabricState *& outFabricState )
A WARM API to acquire the FabricState object that was provided to Warm during Init.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
GetSystemFeatureState
bool GetSystemFeatureState( SystemFeatureType inSystemFeature )
A static function that gets the current State of a System feature.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if the System Feature is enabled, false otherwise.
|
GetULA
WEAVE_ERROR GetULA( InterfaceType inInterfaceType, Inet::IPAddress & outAddress )
A WARM API to acquire a ULA for a specified interface type.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
Init
WEAVE_ERROR Init( WeaveFabricState & inFabricState )
A WARM API to perform one time module initialization.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
||||||
Returns |
WEAVE_NO_ERROR on success, error code otherwise.
|
InvokeActions
void InvokeActions( void )
A WARM API called by a dedicated task to perform various platform API actions.
This represents the entry point to perform the actions necessary which will satisfy the current System State. If for example the Thread stack transitioned from disabled to enabled, then this function would make the necessary platform calls to assign the thread host address etc. This function should be called by platform code only in response to a Warm call to RequestInvokeActions. Calling InvokeActions will result in one or more calls to nl::Warm::Platform API's. Developers should therefore implement RequestInvokeActions and the caller of InvokeActions() appropriately. It might be appropriate for RequestInvokeActions to post an event to the task which would call InvokeActions() for example. Conversely, if the system is single threaded, then RequestInvokeActions could be implemented to call InvokeActions() directly.
LegacyHostAddressAction
PlatformResult LegacyHostAddressAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Host Address for the Legacy Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::HostAddress().
|
LegacyThreadAddressAction
PlatformResult LegacyThreadAddressAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Thread Address for the Legacy 6LoWPAN Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::ThreadAddress().
|
MakePrefix
void MakePrefix( const uint64_t & inGlobalID, const uint16_t subnetId, const uint8_t inPrefixLen, Inet::IPPrefix & outPrefix )
A utility to construct a 48 bit prefix from a globalID.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
MapAvailabilityToPriority
RoutePriority MapAvailabilityToPriority( Profiles::WeaveTunnel::Platform::TunnelAvailabilityMode inAvailability )
A static function that returns a mapping from TunnelAvailability to RoutePriority.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The priority mapped value.
|
RecordPlatformResult
PlatformActionExecution RecordPlatformResult( PlatformResult inResult, ActionType inAction, bool inActionState )
A static function that records the result of a platform API Action call.
This module makes requests to perform actions via platform specific API's. The API's are required to report the kPlatformResultSuccess|kPlatformResultFailure|kPlatformResultInProgress result of that action request. This function records that result and returns true if the result is in-progress and further actions should be delayed.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns |
true the platform API is asynchronously processing the request, false otherwise.
|
ReportActionComplete
void ReportActionComplete( PlatformResult inResult )
A WARM API called to announce the completion of a previous asynchronous platform API call.
It is assumed that platform action API's may need to perform asynchronous operations. If this is true then the platform API will return kPlatformResultInProgress. When this happens new Address and Routing Actions will be suspended until the system calls ReportActionComplete to announce the completion of the operation.
Details | |||
---|---|---|---|
Parameters |
|
SetCurrentActionState
void SetCurrentActionState( ActionType inAction, bool inValue )
A static function that sets the current State of a specified action.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
SetSystemFeatureState
bool SetSystemFeatureState( SystemFeatureType inSystemFeature, bool inValue )
A static function that sets the current State of the System Feature.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
true if the System Feature was changed, false otherwise.
|
ShouldPerformAction
bool ShouldPerformAction( ActionType inAction, FlagsType inNecessarySystemFeatureState, bool & outActivate )
A static function that determines whether the specified action should be performed.
This function examines the condition of the System Feature State flags and determines whether the specified action should be enabled or disabled. The function then examines the current state of the action and if the action is not set to the value required by the System Feature's State, then the function returns true along with the desired action state in outActivate
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns |
true if the action is not currently in the desired state, false otherwise.
|
SystemFeatureStateChangeHandler
void SystemFeatureStateChangeHandler( SystemFeatureType inSystemFeatureType, bool inState )
A static function that Sets the System Feature state and notifies the platform that event state has changed.
Called by the EventStateChange API's to perform the necessary reaction operations.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
TakeActions
void TakeActions( void )
A static function that tests the State of each action and makes a platform API call to change the action State if necessary.
This function uses ShouldPerformAction() to determine if an action state needs to be changed/taken. If ShouldPerformAction() returns true the function will call the appropriate action API to perform the action in order to put it in the desired State. The result of the action API call is passed into RecordPlatformResult() and if that function returns true, the execution of this function is terminated.
ThreadAdvertisementAction
PlatformResult ThreadAdvertisementAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Thread Advertisement State
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::ThreadAdvertisement().
|
ThreadHostAddressAction
PlatformResult ThreadHostAddressAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Host Address for the Thread Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::HostAddress().
|
ThreadHostRouteAction
PlatformResult ThreadHostRouteAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Host Route for the Thread Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::HostRoute().
|
ThreadInterfaceStateChange
void ThreadInterfaceStateChange( InterfaceState inState )
A WARM API called to announce a State change for the Thread interface.
Details | |||
---|---|---|---|
Parameters |
|
ThreadRoutePriorityAction
PlatformResult ThreadRoutePriorityAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Thread Route Priority based on the Tunnel Availability.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::ThreadRoutePriority().
|
ThreadRoutingStateChange
void ThreadRoutingStateChange( InterfaceState inState )
A WARM API called to announce a State change for the Thread Routing feature.
Details | |||
---|---|---|---|
Parameters |
|
ThreadThreadAddressAction
PlatformResult ThreadThreadAddressAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Thread Address for the Thread Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::ThreadAddress().
|
ThreadThreadRouteAction
PlatformResult ThreadThreadRouteAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Thread Route for the Thread Stack.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::ThreadRoute().
|
TunnelHostAddressAction
PlatformResult TunnelHostAddressAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the HostAddress for the Tunnel Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::HostAddress().
|
TunnelHostRouteAction
PlatformResult TunnelHostRouteAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the HostRoute for the Tunnel Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::HostRoute().
|
TunnelInterfaceStateChange
void TunnelInterfaceStateChange( InterfaceState inState )
A WARM API called to announce a State change for the Weave Tunnel interface.
Details | |||
---|---|---|---|
Parameters |
|
TunnelPriorityStateChange
void TunnelPriorityStateChange( nl::Weave::Profiles::WeaveTunnel::Platform::TunnelAvailabilityMode inAvailability )
A WARM API called to update the priority of the Tunnel Service.
Details | |||
---|---|---|---|
Parameters |
|
TunnelServiceStateChange
void TunnelServiceStateChange( InterfaceState inState, nl::Weave::Profiles::WeaveTunnel::Platform::TunnelAvailabilityMode inAvailability )
A WARM API called to announce a State change for the Weave Tunnel interface.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
WiFiHostAddressAction
PlatformResult WiFiHostAddressAction( ActionType inAction, bool inActivate, const uint64_t & inGlobalId, const uint64_t & inInterfaceId )
One of the Action methods.
Sets the Host Address for the WiFi Interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
Forwards the result from Platform::HostAddress().
|
WiFiInterfaceStateChange
void WiFiInterfaceStateChange( InterfaceState inState )
A WARM API called to announce a State change for the WiFi interface.
Details | |||
---|---|---|---|
Parameters |
|