00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 #ifndef __JAUS_EXTRAS_VIDEO_REPORT_IMAGE__H 00041 #define __JAUS_EXTRAS_VIDEO_REPORT_IMAGE__H 00042 00043 #include "jaus/extras/extrascodes.h" 00044 #include "jaus/core/message.h" 00045 #include <cxutils/images/image.h> 00046 00047 namespace JAUS 00048 { 00049 typedef CxUtils::Image Image; 00050 00058 class JAUS_EXTRAS_DLL ReportImage : public Message 00059 { 00060 public: 00061 ReportImage(const Address& dest = Address(), const Address& src = Address()); 00062 ReportImage(const ReportImage& message); 00063 ~ReportImage(); 00064 void SetFrameNumber(const UInt fnumber) { mFrameNumber = fnumber; } 00065 void SetCameraID(const Byte id) { mCameraID = id; } 00066 void SetImageFormat(const Image::Format format) { mFormat = format; } 00067 void SetImage(const Image::Format format, 00068 const Packet& imageData) { mFormat = format; mImage = imageData; } 00069 inline Byte GetCameraID() const { return mCameraID; } 00070 inline UInt GetFrameNumber() const { return mFrameNumber; } 00071 inline Image::Format GetFormat() const { return mFormat; } 00072 inline Packet* GetImage() { return &mImage; } 00073 inline const Packet* GetImage() const { return &mImage; } 00074 virtual bool IsCommand() const { return false; } 00075 virtual int WriteMessageBody(Packet& packet) const; 00076 virtual int ReadMessageBody(const Packet& packet); 00077 virtual Message* Clone() const { return new ReportImage(*this); } 00078 virtual UInt GetPresenceVector() const { return 0; } 00079 virtual UInt GetPresenceVectorSize() const { return 0; } 00080 virtual UInt GetPresenceVectorMask() const { return 0; } 00081 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00082 virtual std::string GetMessageName() const { return "Report Image"; } 00083 virtual void ClearMessageBody(); 00084 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize) const; 00085 ReportImage& operator=(const ReportImage& message); 00086 protected: 00087 Image::Format mFormat; 00088 Byte mCameraID; 00089 UInt mFrameNumber; 00090 Packet mImage; 00091 }; 00092 } 00093 00094 #endif 00095 /* End of File */