Name | Description |
---|---|
PSEtherAppMsg (packet) |
The Publish-Subscribe Application Packet |
// The Publish-Subscribe Application Packet format // // Copyright (C) 2011 Nikolaos Vastardis; University of Essex, Colchester // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program; if not, see <http://www.gnu.org/licenses/>. // cplusplus {{ #include <stdio.h> #include <omnetpp.h> #include <sys/types.h> #include <iostream> #include <string> #include "InformationItem.h" #include "BA_API.h" #include "INETDefs.h" inline std::ostream& operator<<(std::ostream& out, InformationItem& II) { out << "{"; out << II.info(); out << endl << "}"; return out; } }} class noncobject InformationItem; // // <b> The Publish-Subscribe Application Packet </b> // // Pub-sub packet sent by Publish and Subscribe Ethernet Applications. Contains // the FID of the message, in order to be forwarded to the correct subscribers, // the type of the packet (e.g. ), the length of the scope (according the the 8 // byte PURSUIT_ID_LEN) and finally the whole Information Item ID (IIID). This // IIID includes the scope and the ID of the Information Item sent, according // to the C++ class, InformationItem. If the size of the PSEtherApp message is // greater than ~1400, it will consist of several Ethernet frames. The last field // of the message is optional and can be used for detection of palse positives. // It is suggested that it is controlled by a global variable. // // @see PEtherApp, SEtherApp // // @author: Nikolaos Vastardis // packet PSEtherAppMsg { uint8_t type; string FID; uint8_t scopeLen; InformationItem IIID; string path[]; }