module rrEvent

Parent Previous Next



The module rrEvent is available in server event plugins only.

It is already loaded/imported.


Classes

Exception rrCleanExit

Available in:


Description:

If you raise an exception, the execution is stopped. All other exceptions are seen as an error.

But if you call 

raise rrCleanExit() 

then RR will ignore the exception and exit the script.




Functions - trigger job



_JobSend    getJob()


Description:

Returns the job that triggered the event.



int    logCount()


Description:

Number of log events that triggered this plugin in the last ~45s




_Log logItem(int idx) 


Description:

Get the log event at index idx.



int    errCount()


Description:

Number of error events that triggered this plugin in the last ~45s



_Error errItem(int idx)


Description:

Get the error event at index idx.



rrTime firstTime()


Description:

The time of the first event that triggered this plugin.



rrTime lastTime()


Description:

The last time this plugin was triggered.



QString allEvents()


Description:

This string contains each event in one line with time and client name.





Functions - general





rrString50 whoAsString(int id)


Description:

The _Error and _Log class have a parameter named .who.

This function whoAsString() converts the .who ID into a string.




int   jobAll_count()


Description:

Returns the number of all jobs available in this RR application.


_JobSend     jobAll_get(int index)


Description:

Returns a copy of a job by its index. 


int   clientAll_count()


Description:

Gets the number of clients.


_Client   clientAll_get(int clientID)


Description:

Gets a client by its index.


bool    jobSendCommand(list<UInt64> jobIDs,  _LogMessage commandID, UInt64 commandParam)


Description:

Send a Change Settings command to the rrServer.

jobIDs is a list with JobIDs of jobs that you want to send a command to.



Note:

The job in rrControl will not update until rrControl gets an update from the rrServer.


bool    clientSendCommand(const bp::list clients, quint8 commandID, PyObject* param);


Description:

Sends a command to rrClients.

clientArray is a list with client IDs. If the list has only one element and the ID is -1, then the command is applied to all clients.

param is an optional string parameter. It can be used to send commandlines to the client with the commandID "rrGlobal._ClientCommand.cCommandLine"