Public Types | Public Member Functions | Private Attributes

# ShMessage Class Reference

Defines and stores messages transferred between plug-ins. More...

`#include <shmessage.h>`

Collaboration diagram for ShMessage:
[legend]

List of all members.

## Public Types
enum | MessageType { mtUnknown = 0, mtValue, mtGet, mtAck, mtReload, mtError }
## Public Member Functions
| ShMessage ()
| Constructor of ShMessage, an initialization of the object.
bool | setMsgType (QString typeStr)
| Sets a type of the message according to given string.
QString | msgTypeStr ()
| Returns the message type in a form of string.
void | setMsgType (MessageType msgType)
MessageType | msgType ()
void | setPin (ShPin pin)
ShPin | pin ()
void | setSignal (QString signal)
QString | signal ()
void | setValue (QVariant value)
QVariant | value ()
void | setSenderId (int senderId)
int | senderId ()
void | setReceiverId (int receiverId)
int | receiverId ()
void | setRequireAck (bool requireAck)
bool | requireAck ()
## Private Attributes
MessageType | mMsgType
QString | mSignal
QVariant | mValue
int | mSenderId
int | mReceiverId
ShPin | mPin
bool | mRequireAck

## Detailed Description

Defines and stores messages transferred between plug-ins.

Definition at line 43 of file shmessage.h.

## Member Enumeration Documentation

enum ShMessage::MessageType

Enumerator:

  mtUnknown |
  mtValue |
  mtGet |
  mtAck |
  mtReload |
  mtError |

Definition at line 46 of file shmessage.h.

## Constructor & Destructor Documentation

ShMessage::ShMessage | ( |  | ) |

Constructor of ShMessage, an initialization of the object.

Definition at line 25 of file shmessage.cpp.

References mMsgType, mReceiverId, mRequireAck, and mSenderId.

## Member Function Documentation

MessageType ShMessage::msgType | ( |  | ) | `[inline]`

Definition at line 57 of file shmessage.h.

References mMsgType.

QString ShMessage::msgTypeStr | ( |  | ) |

Returns the message type in a form of string.

Returns:
  Message type in a form of string

Definition at line 56 of file shmessage.cpp.

References mMsgType, mtAck, mtError, mtGet, mtReload, and mtValue.

ShPin ShMessage::pin | ( |  | ) | `[inline]`

Definition at line 60 of file shmessage.h.

References mPin.

int ShMessage::receiverId | ( |  | ) | `[inline]`

Definition at line 71 of file shmessage.h.

References mReceiverId.

bool ShMessage::requireAck | ( |  | ) | `[inline]`

Definition at line 74 of file shmessage.h.

References mRequireAck.

int ShMessage::senderId | ( |  | ) | `[inline]`

Definition at line 69 of file shmessage.h.

References mSenderId.

bool ShMessage::setMsgType | ( | QString | typeStr | ) |

Sets a type of the message according to given string.

Parameters:

  | typeStr | Message type in a form of string

Returns:
  true if the type has been recognized

Definition at line 39 of file shmessage.cpp.

References mMsgType, mtAck, mtError, mtGet, mtReload, and mtValue.

void ShMessage::setMsgType | ( | MessageType | msgType | ) | `[inline]`

Definition at line 56 of file shmessage.h.

References mMsgType.

void ShMessage::setPin | ( | ShPin | pin | ) | `[inline]`

Definition at line 59 of file shmessage.h.

References mPin.

void ShMessage::setReceiverId | ( | int | receiverId | ) | `[inline]`

Definition at line 70 of file shmessage.h.

References mReceiverId.

void ShMessage::setRequireAck | ( | bool | requireAck | ) | `[inline]`

Definition at line 73 of file shmessage.h.

References mRequireAck.

void ShMessage::setSenderId | ( | int | senderId | ) | `[inline]`

Definition at line 68 of file shmessage.h.

References mSenderId.

void ShMessage::setSignal | ( | QString | signal | ) | `[inline]`

Definition at line 62 of file shmessage.h.

References mSignal.

void ShMessage::setValue | ( | QVariant | value | ) | `[inline]`

Definition at line 65 of file shmessage.h.

References mValue.

QString ShMessage::signal | ( |  | ) | `[inline]`

Definition at line 63 of file shmessage.h.

References mSignal.

QVariant ShMessage::value | ( |  | ) | `[inline]`

Definition at line 66 of file shmessage.h.

References mValue.

## Member Data Documentation

MessageType ShMessage::mMsgType`[private]`

Definition at line 74 of file shmessage.h.

Referenced by msgType(), msgTypeStr(), setMsgType(), and ShMessage().

ShPin ShMessage::mPin`[private]`

Definition at line 81 of file shmessage.h.

Referenced by pin(), and setPin().

int ShMessage::mReceiverId`[private]`

Definition at line 80 of file shmessage.h.

Referenced by receiverId(), setReceiverId(), and ShMessage().

bool ShMessage::mRequireAck`[private]`

Definition at line 82 of file shmessage.h.

Referenced by requireAck(), setRequireAck(), and ShMessage().

int ShMessage::mSenderId`[private]`

Definition at line 80 of file shmessage.h.

Referenced by senderId(), setSenderId(), and ShMessage().

QString ShMessage::mSignal`[private]`

Definition at line 78 of file shmessage.h.

Referenced by setSignal(), and signal().

QVariant ShMessage::mValue`[private]`

Definition at line 79 of file shmessage.h.

Referenced by setValue(), and value().

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

- daemon/shmessage.h
- daemon/shmessage.cpp

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends