.

ServiceCreate

Declaration

const Service serviceCreate(MPIEventMgr eventMgr, 
long priority,
long sleep)
  Required Header: service.h

Description

ServiceCreate creates threads for each control associated with eventMgr, flushes eventMgr, and starts threads with priority that call mpiEventMgrService(eventMgr, . ) every sleep milliseconds.

 
priority

is a platform-specific variable.

If "priority" is
Then
-1
The operating system will choose some default priority for the service's threads. See Default Thread Parameters table below.
>0
ServiceCreate will attempt to assign the priority to all of the service's threads.

Default Thread Parameters

These are the default thread priorities (when -1 is specified).

OS
Priority
Windows
THREAD_PRIORITY_TIME_CRITICAL
RTSS
RT_PRIORITY_MAX
VxWorks
0
Linux
Maximum (defined by pthread schedule policy max priority)
Solaris
Maximum (defined by pthread schedule policy max priority)

 

sleep
If "sleep" is
Then
-1
ServiceCreate will attempt to create interrupt driven threads.
0
ServiceCreate will create threads that call mpiEventMgrService(eventMgr,...) as quickly as possible.
>0
ServiceCreate will create threads that attempt to call mpiEventMgrService(eventMgr,...) every sleep milliseconds.
   
 
Return Values
handle to a Service object
MPIHandleVOID if the Service could not be created

 

See Also

mpiEventMgrService | ServiceDelete

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2010 Motion Engineering