C++ TargetRTS
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Log::Base Class Reference

Represents a log port. More...

#include <RTLog.h>

Inheritance diagram for Log::Base:
RTProtocol

Public Member Functions

void cr (void)
 Print a carriage return to the log.
 
void crtab (int=1)
 
void open (const char *)
 
void open (void)
 
void close (void)
 
void log (const char *str)
 Print a string to the log, followed by a carriage return.
 
void log (const RTString &str)
 Print a string to the log, followed by a carriage return.
 
void show (const char *str)
 Print a string to the log.
 
void show (const RTString &str)
 Print a string to the log.
 
void log (char)
 
void log (int)
 
void log (long)
 
void log (long long)
 
void log (short)
 
void log (const RTDataObject &)
 
void log (const void *data, const RTObject_class *type)
 Print the default ASCII encoding of an object to the log, followed by a carriage return.
 
void log (const RTTypedValue &)
 Print the default ASCII encoding of an object to the log, followed by a carriage return.
 
void log (unsigned int)
 
void log (unsigned long)
 
void log (unsigned long long)
 
void log (unsigned short)
 
void log (unsigned char)
 
void show (char)
 
void show (int)
 
void show (long)
 
void show (long long)
 
void show (short)
 
void show (const RTDataObject &)
 
void show (const void *data, const RTObject_class *type)
 Print the default ASCII encoding of an object to the log.
 
void show (const RTTypedValue &)
 Print the default ASCII encoding of an object to the log.
 
void show (unsigned int)
 
void show (unsigned long)
 
void show (unsigned long long)
 
void show (unsigned short)
 
void show (unsigned char)
 
void space (void)
 
void tab (void)
 
void clear (void)
 
void commit (void)
 Flush all buffered characters to the log.
 
- Public Member Functions inherited from RTProtocol
RTControllercontext (void) const
 Get the context of the capsule that owns this port.
 
int getId (void) const
 Get the id of the port.
 
const RTPortDescriptorgetInfo (void) const
 Get information about a port.
 
const char * getName (void) const
 Get the name of the port.
 
RTActorgetOwner (void) const
 Get the owner capsule to which the port belongs.
 
int size (void) const
 Get the size of the port.
 
int resize (int new_size)
 Set a new size (i.e.
 
int registerSAP (const char *service)
 Register an unwired port (SAP) with the layer service (as a "client").
 
int deregisterSAP (void)
 Deregister an unwired port (SAP).
 
int registerSPP (const char *service)
 Register an unwired port (SPP) with the layer service (as the "provider").
 
int deregisterSPP (void)
 Deregister an unwired port (SPP).
 
const char * defaultLayerName (void) const
 Get the default registration name for the port.
 
int isRegistered (void) const
 Determine if the port is currently registered with the layer service or not.
 
const char * getRegisteredName (void) const
 Get the registration name of the port.
 
int registerAs (const char *service)
 Register an unwired port either as an SAP or SPP (depending on the "Publish" property of the port).
 
int deregister (void)
 Deregister an unwired port (either an SAP or SPP).
 
int isBoundAt (int index) const
 Determine if a port instance is currently connected to another port instance.
 
int isIndexTo (int index, RTActor *capsule) const
 Determine if a port instance is currently connected to a port instance owned by a certain capsule instance.
 
int indexTo (RTActor *capsule) const
 Determine if there exists a port instance currently connected to a port instance owned by a certain capsule instance.
 
int purge (void)
 Empty the defer queue of all port instances without recalling any deferred message.
 
int purgeAt (int index)
 Empty the defer queue of a specified port instance without recalling any deferred message.
 
int recall (void)
 Recall a message from the defer queue and insert it at the back of the controller's message queue (after other queued messages).
 
int recallFront (void)
 Recall a message from the defer queue and insert it at the front of the controller's message queue (before other queued messages).
 
int recallAt (int index, int front=0)
 Recall a message from the defer queue and insert it in the controller's message queue.
 
int recallAll (void)
 Recall all messages from the defer queue and insert them at the back of the controller's message queue (after other queued messages).
 
int recallAllFront (void)
 Recall all messages from the defer queue and insert them at the front of the controller's message queue (before other queued messages).
 
int recallAllAt (int index, int front=0)
 Recall all messages from the defer queue and insert them in the controller's message queue.
 
void bindingNotification (int on_off)
 Turn on or off binding notifications for this port.
 
int bindingNotificationRequested (void) const
 Determine if binding notifications are currently enabled for the port.
 
void sendTypeCheckEnable (int on_off)
 Turn on or off type checking when performing send(), invoke() or reply() on the port.
 
int sendTypeCheckEnabled (void) const
 Determine if type checking when sending events is enabled.
 
RTProtocolDescriptor::Status sendCheck (int signal, const RTObject_class *type) const
 Check if a particular event would be possible to send on this port.
 
void receiveTypeCheckEnable (int on_off)
 Turn on or off type checking when receiving an event on the port.
 
int receiveTypeCheckEnabled (void) const
 Determine if type checking when receiving events is enabled.
 
RTProtocolDescriptor::Status receiveCheck (int signal, const RTObject_class *type) const
 Check if a particular event would be possible to receive on this port.
 
int invoke (RTMessage *replyBuffer, int signal, const void *data, const RTObject_class *type, bool implicitReply)
 Invoke an event on the port.
 
int invokeAt (int index, RTMessage *replyBuffer, int signal, const void *data, const RTObject_class *type, bool implicitReply)
 Invoke an event on a replicated port at a specified index.
 
int reply (int signal, const void *data, const RTObject_class *type)
 Make a reply to respond to an invoke.
 
int send (int signal, const void *data, const RTObject_class *type, int priority, bool moveData=false)
 Send an event on the port.
 
int sendAt (int index, int signal, const void *data, const RTObject_class *type, int priority, bool moveData=false)
 Send an event on a replicated port at a specified index.
 

Static Public Attributes

static const RTProtocolDescriptor rt_class
 

Additional Inherited Members

- Protected Types inherited from RTProtocol
enum  {
  BindingNotification = 1 , RegisteredAsSAP = 2 , SendTypeCheck = 4 , ReceiveTypeCheck = 8 ,
  Resized = 16
}
 
enum  { rtiLast_RTProtocol = 0 }
 
- Protected Member Functions inherited from RTProtocol
void init (const RTPortDescriptor *)
 
int getFlags (void) const
 
void setFlag (int)
 
void resetFlag (int)
 
void bindAt (int, RTBindingEnd &, RTController *)
 
int peerAt (int, RTBindingEnd &)
 
void unbindAt (int, RTController *)
 
void notifyInit (RTController *)
 
void notifyBoundAt (int, RTController *)
 

Detailed Description

Represents a log port.

Member Function Documentation

◆ commit()

void Log::Base::commit ( void  )

Flush all buffered characters to the log.

It's important to call this function when you want to see any output in the log, otherwise printed characters may only show up once the underlying stream buffer is full.

◆ log() [1/4]

void Log::Base::log ( const char *  str)

Print a string to the log, followed by a carriage return.

Parameters
[in]strString to print to the log.

◆ log() [2/4]

void Log::Base::log ( const RTString str)

Print a string to the log, followed by a carriage return.

Parameters
[in]strString to print to the log.

◆ log() [3/4]

void Log::Base::log ( const RTTypedValue info)

Print the default ASCII encoding of an object to the log, followed by a carriage return.

Parameters
[in]infoAn RTTypedValue object which encapsules the data object to print and its type descriptor. The type descriptor must provide an encode function.

◆ log() [4/4]

void Log::Base::log ( const void *  data,
const RTObject_class type 
)

Print the default ASCII encoding of an object to the log, followed by a carriage return.

Parameters
[in]dataData object to encode to a string that will be printed to the log
[in]typeType descriptor for the data object. Must provide an encode function.

◆ show() [1/4]

void Log::Base::show ( const char *  str)

Print a string to the log.

Parameters
[in]strString to print to the log.

◆ show() [2/4]

void Log::Base::show ( const RTString str)

Print a string to the log.

Parameters
[in]strString to print to the log.

◆ show() [3/4]

void Log::Base::show ( const RTTypedValue info)

Print the default ASCII encoding of an object to the log.

Parameters
[in]infoAn RTTypedValue object which encapsules the data object to print and its type descriptor. The type descriptor must provide an encode function.

◆ show() [4/4]

void Log::Base::show ( const void *  data,
const RTObject_class type 
)

Print the default ASCII encoding of an object to the log.

Parameters
[in]dataData object to encode to a string that will be printed to the log
[in]typeType descriptor for the data object. Must provide an encode function.

The documentation for this class was generated from the following files: