smartinspectpython.sicontrolcommand

@export
class SIControlCommand(smartinspectpython.sipacket.SIPacket):

Represents the Control Command packet type which is used for administrative tasks like resetting or clearing the Console.

A Control Command can be used for several administrative Console tasks. Among other things, this packet type allows you to SISession.ClearAll.

Threadsafety:

This class is not guaranteed to be thread-safe. However, instances of this class will normally only be used in the context of a single thread.

SIControlCommand( controlCommandType: smartinspectpython.sicontrolcommandtype.SIControlCommandType)

Initializes a new ControlCommand instance with a custom control command type.

Arguments:
  • controlCommandType (SIControlCommandType): The type of the new Control Command describes the way the Console interprets this packet. Please see the SIControlCommandType enum for more information.
HEADER_SIZE: int = 8

Gets the Level property value.

Represents the log level of this packet.

Every packet can have a certain log level value. Log levels describe the severity of a packet. Please see the Level enum for more information about log levels and their usage.

Gets the ControlCommandType property value.

The type of the Control Command describes the way the Console interprets this packet. Please see the SIControlCommandType enum for more information.

Data: _io.BytesIO

Gets the Data property value.

This property contains an optional data stream of the Control Command. This property can be null if this Control Command does not contain additional data.

Important: Treat this stream as read-only. This means, modifying this stream in any way is not supported. Additionally, only pass streams which support seeking. Streams which do not support seeking cannot be used by this class.

DataLength: int

Returns the number of bytes used in the Data property. Note that this is the actual # of bytes used, and not the # of bytes allocated!

HasData: bool

Returns true if this packet contains optional data; otherwise, false.

Overridden. Returns SIPacketType.ControlCommand

Size: int

Overridden. Returns the total occupied memory size of this Control Command packet.

The total occupied memory size of this Control Command is the size of memory occupied the optional Data stream and any internal data structures of this Control Command.