interface ti.uia.runtime.IServiceMgrSupport

Interface defining the ServiceMgr's proxy

This module defines the interface that the ServiceMgr support proxy must adhere to.
XDCspec summary sourced in ti/uia/runtime/IServiceMgrSupport.xdc
interface IServiceMgrSupport {  ...
// inherits xdc.runtime.IModule
XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
package ti.uia.runtime;
 
interface IServiceMgrSupport {
module-wide config parameters
module-wide functions
    Void setPeriod// Function called within ServiceMgr_setPeriod(Int id, UInt32 periodInMs);
 
    metaonly Void newService// Function called within ServiceMgr_register(Int id, UInt32 periodInMs);
}
 
metaonly config IServiceMgrSupport.common$  // module-wide

Common module configuration parameters

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
metaonly config Types.Common$ common$;
 
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

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
Void freePacket(UIAPacket.Hdr *packet);
 
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

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
UIAPacket.Hdr *getFreePacket(UIAPacket.HdrType type, UInt timeout);
 
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

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
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

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
Bool sendPacket(UIAPacket.Hdr *packet);
 
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

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
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

XDCspec declarations sourced in ti/uia/runtime/IServiceMgrSupport.xdc
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.
generated on Tue, 14 Feb 2017 00:15:15 GMT