C# Class OSAE.Service.OSAEService

Show file Open project: opensourceautomation/Open-Source-Automation Class Usage Examples

Public Methods

Method Description
LoadPlugins ( string serviceName ) : void

UnhandledPluginExceptions ( object sender, UnhandledExceptionEventArgs args ) : void
pluginExist ( string name ) : bool
startPlugin ( string serviceName, OSAE.Service.Plugin plugin ) : void
stopPlugin ( string serviceName, OSAE.Service.Plugin p ) : void

Private Methods

Method Description
CheckServiceObject ( ) : string

Check if there is an object for the Service running on this machine in OSA, and create one if not.

DeleteStoreFiles ( ) : void
InitialiseOSAInEventLog ( ) : void

Check if there is a OSA message container in the Event log and create one if not.

MethodMessageReceived ( PacketHeader header, Connection connection, string message ) : void
PluginMessageReceived ( PacketHeader header, Connection connection, string message ) : void
QueryCommandQueue ( ) : void

periodically checks the command queue to see if there is any commands that need to be processed by plugins

ShutDownSystems ( ) : void

Stops all the plugins

StartNetworkListener ( ) : void
StartPlugin ( string serviceName, OSAEMethod method ) : void

Starts a plugin based on a method

StartThreads ( string serviceName ) : void

Starts the various OSA threads that monitors the command Queue, and monitors plugins

StopPlugin ( string serviceName, OSAEMethod method ) : void

Stops a plugin based on a method

checkPlugins_tick ( object source, EventArgs e ) : void
pluginLoaded ( string type ) : bool

Method Details

LoadPlugins() public method

public LoadPlugins ( string serviceName ) : void
serviceName string
return void

UnhandledPluginExceptions() public method

public UnhandledPluginExceptions ( object sender, UnhandledExceptionEventArgs args ) : void
sender object
args System.UnhandledExceptionEventArgs
return void

pluginExist() public method

public pluginExist ( string name ) : bool
name string
return bool

startPlugin() public method

public startPlugin ( string serviceName, OSAE.Service.Plugin plugin ) : void
serviceName string
plugin OSAE.Service.Plugin
return void

stopPlugin() public method

public stopPlugin ( string serviceName, OSAE.Service.Plugin p ) : void
serviceName string
p OSAE.Service.Plugin
return void