North State Framework in C#  V3.0.0
An object-oriented framework for implementing UML state machines.
Public Member Functions | Static Public Member Functions | List of all members
NSFOSSignal Class Reference

Represents an operating system signal that may be used to block thread execution until the signal is sent. More...

Inheritance diagram for NSFOSSignal:
NSFTimerAction INSFNamedObject

Public Member Functions

 NSFOSSignal (NSFString name)
 Creates an operating system signal. More...
 
void clear ()
 Clears the signal. More...
 
void send (NSFContext context)
 Sends the signal. More...
 
void send ()
 Sends the signal. More...
 
bool wait ()
 Waits for signal to be sent. More...
 
bool wait (Int32 timeout)
 Waits for up to timeout milliseconds for a signal to be sent. More...
 
- Public Member Functions inherited from NSFTimerAction
bool isScheduled ()
 Checks if the action is already scheduled. More...
 
void schedule ()
 Schedules the action to execute at the previously designated delay and repeat times. More...
 
void schedule (NSFTime delayTime)
 Schedules the action to execute after the specified delay time with zero repeat time. More...
 
void schedule (NSFTime delayTime, NSFTime repeatTime)
 Schedules the action to execute at the specified times. More...
 
void scheduleAbsoluteExecution ()
 Schedules the action to execute at its designated execution time. More...
 
void scheduleAbsoluteExecution (NSFTime executionTime)
 Schedules the action to execute at the specified execution time. More...
 
void scheduleAbsoluteExecution (NSFTime executionTime, NSFTime repeatTime)
 Schedules the action to execute at the specified execution time. More...
 
void unschedule ()
 Unschedules the action. More...
 

Static Public Member Functions

static NSFOSSignal create (NSFString name)
 Creates an operating system signal. More...
 

Additional Inherited Members

- Protected Member Functions inherited from NSFTimerAction
 NSFTimerAction (NSFString name)
 Creates a timer action. More...
 
- Properties inherited from NSFTimerAction
NSFTime DelayTime [get, set]
 Gets or sets the delay time of the action. More...
 
NSFTime ExecutionTime [get, set]
 Gets or sets the execution time of the action. More...
 
NSFString Name [get, set]
 Gets or sets the name of the action. More...
 
NSFTime RepeatTime [get, set]
 Gets or sets the repeat time for periodic actions, 0 if non-periodic. More...
 
- Properties inherited from INSFNamedObject
NSFString Name [get]
 Gets the name of the object. More...
 

Detailed Description

Represents an operating system signal that may be used to block thread execution until the signal is sent.

Constructor & Destructor Documentation

Creates an operating system signal.

Parameters
nameThe name of the signal.

Member Function Documentation

void clear ( )

Clears the signal.

This method sets the signal to a non-signaled state, so that the next wait will block until a send is called.

static NSFOSSignal create ( NSFString  name)
static

Creates an operating system signal.

Parameters
nameThe name of the signal.
Returns
The new signal.

This method is included for interface compatibility with other language implementations.

void send ( NSFContext  context)

Sends the signal.

Parameters
contextThe context in which the method is called.
void send ( )

Sends the signal.

bool wait ( )

Waits for signal to be sent.

Returns
True if the signal was sent, false otherwise.

This method will block the calling thread until the signal is sent. Multiple threads must not wait on the same signal.

bool wait ( Int32  timeout)

Waits for up to timeout milliseconds for a signal to be sent.

Parameters
timeoutThe maximum number of milliseconds to wait.
Returns
True if the signal was sent, false otherwise.

This method will block the calling thread until the signal is sent or the timeout occurs. Multiple threads must not wait on the same signal.




Copyright 2004-2014, North State Software, LLC. All rights reserved.