This module defines the interface that the ServiceMgr
support proxy must adhere to.
metaonly config IServiceMgrSupport.common$ // module-wide |
 |
Common module configuration parameters
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
IServiceMgrSupport.freePacket() // module-wide |
 |
Function called within ServiceMgr_freePacket
ARGUMENTS
packet
Pointer to a UIAPacket
DETAILS
This function can be used to return an unused packet back to the
module. It must only return packets that were obtained via
the
getFreePacket function.
IServiceMgrSupport.getFreePacket() // module-wide |
 |
Function called within ServiceMgr_getFreePacket
ARGUMENTS
type
Requested type of packet
timeout
return after this many system time units
RETURNS
Point to the free UIA packet. NULL if not successful.
DETAILS
The service can specify what type of packet it wants with the
first parameter.
The function fills in the HdrType field of the packet automatically
for the service. All other fields are un-initialized.
IServiceMgrSupport.requestEnergy() // module-wide |
 |
Function called within ServiceMgr_requestEnergy
Void requestEnergy(Int id);
ARGUMENTS
id
Id of the service
DETAILS
Generally services do not maintain an active thread. Services may
request the ServiceMgr module to call the
ProcessCallback
in the context of the transfer agent. This can be accomplished via
this function.
IServiceMgrSupport.sendPacket() // module-wide |
 |
Function called within ServiceMgr_sendPacket
ARGUMENTS
packet
UIAPacket to be sent
RETURNS
TRUE denotes success and the packet is
no longer owned by the caller. FALSE denotes
failure and the packet is still owned by the caller.
DETAILS
All UIAPacket fields except for SenderAdrs must be filled in.
The caller loses ownership of the packet once it is successfully sent.
If this function fails, the caller still owns the packet.
IServiceMgrSupport.setPeriod() // module-wide |
 |
Function called within ServiceMgr_setPeriod
Void setPeriod(Int id, UInt32 periodInMs);
ARGUMENTS
id
Service id of the service
periodInMs
Requested period in milliseconds
DETAILS
Services period should be a multiple of the ServiceMgr's period
(
periodInMs). If it is not, they will called at the rounded
up period. For example, if ServiceMgr.periodInMs = 100 and a service sets
its period to 250. That service will be called every 300 milliseconds.
metaonly IServiceMgrSupport.newService() // module-wide |
 |
Function called within ServiceMgr_register
metaonly Void newService(Int id, UInt32 periodInMs);
ARGUMENTS
id
Id of the new service
periodInMs
Period requested by the service (in millisecond)
DETAILS
All services must call ServiceMgr.register. The ServiceMgr
manages the processFxn callback. It then calls the proxy's
newService function.