#include <bitefficient_format.h>
|
| static char | getEOFCollection () |
| | returns the very used end-of-collection marker More...
|
| |
| static char | getEOFEnvelope () |
| |
| static std::string | getByteLengthEncodedString (const std::string &sword) |
| |
| static std::string | getNullTerminatedString (const std::string &sword) |
| |
| static std::string | getString (const std::string &sword) |
| |
| static std::string | getCodedNumber (const std::string &cn) |
| | implements a coded number passed as a string it goes through it digit by digit(char by char) More...
|
| |
| static std::string | getCodedNaturalNumber (const std::string &cn) |
| | Allow proper generation of natural numbers, will remove any leading zeros. More...
|
| |
| static std::string | getBinDateTimeToken (const std::string &date1) |
| | implements the date time token production of the grammar; not complete(w.r.t. the specification) in functionality implementing the messages without the rest of the architecture makes it difficult to anticipate when and how some productions may/will be used so only a few of the productions were implemented and the char parameter was added to choose between them, as no other decission maker/constraint was identified More...
|
| |
| static std::string | getBinDateTimeToken (const base::Time &time) |
| | implements the date time token production of the grammar; not complete(w.r.t. the specification) in functionality implementing the messages without the rest of the architecture makes it difficult to anticipate when and how some productions may/will be used so only a few of the productions were implemented and the char parameter was added to choose between them, as no other decission maker/constraint was identified More...
|
| |
| static std::string | getBinDate (const base::Time &time) |
| |
| static std::string | getBinDate (const std::string &date1) |
| | takes the string representing the date and passes it's digits 2 by 2(as length 2 sugstrings) to the byte encoding function it did not explicitly specify but it was induced from the way it was stated that the date is to be encoded as a coded number(comment 9 of the specification) More...
|
| |
| static std::string | getBinNumber (uint32_t number, bool asHex=false) |
| |
| static std::string | getACLRepresentation (const representation::Type &type) |
| |
| static std::string | getDigits (const std::string &numberString) |
| |
| static std::string | getDigits (uint32_t number) |
| |
| static std::string | getReceivedObject (const ReceivedObject &object) |
| |
| static std::string | getAgentID (const AgentID &agentId) |
| |
| static std::string | getAgentIDSequence (const std::vector< AgentID > &agentIds) |
| |
| static std::string | getBinStringNoCodetable (const std::string &sword) |
| |
Definition at line 13 of file bitefficient_format.h.
◆ getACLRepresentation()
| std::string fipa::acl::BitefficientFormat::getACLRepresentation |
( |
const representation::Type & |
type | ) |
|
|
static |
Encode representation
Definition at line 176 of file bitefficient_format.cpp.
178 std::string msg =
"";
182 msg += char(0x10);
break;
184 msg += char(0x11);
break;
186 msg += char(0x12);
break;
188 throw std::runtime_error(
"BitefficientFormat: Cannot encode unknown acl representation");
◆ getAgentID()
| std::string fipa::acl::BitefficientFormat::getAgentID |
( |
const AgentID & |
agentId | ) |
|
|
static |
Retrieve encoded agent id for envelopes
Definition at line 231 of file bitefficient_format.cpp.
236 const Addresses& addresses = agentId.getAddresses();
237 if(!addresses.empty())
239 Addresses::const_iterator cit = addresses.begin();
240 agentIdString += char(0x02);
241 for(; cit != addresses.end(); ++cit)
250 const Resolvers& resolvers = agentId.getResolvers();
251 if(!resolvers.empty())
253 Resolvers::const_iterator cit = resolvers.begin();
254 agentIdString += char(0x03);
255 for(; cit != resolvers.end(); ++cit)
265 if(!userdefParams.empty())
267 UserdefinedParameterList::const_iterator cit = userdefParams.begin();
268 for(; cit != userdefParams.end(); ++cit)
270 agentIdString += char(0x05);
277 return agentIdString;
std::vector< UserdefParam > UserdefinedParameterList
std::vector< std::string > Addresses
◆ getAgentIDSequence()
| std::string fipa::acl::BitefficientFormat::getAgentIDSequence |
( |
const std::vector< AgentID > & |
agentIds | ) |
|
|
static |
Get sequence of agents ids
Definition at line 280 of file bitefficient_format.cpp.
282 std::vector<AgentID>::const_iterator cit = agentIds.begin();
283 std::string sequence;
284 for(;cit != agentIds.end(); ++cit)
◆ getBinDate() [1/2]
| std::string fipa::acl::BitefficientFormat::getBinDate |
( |
const base::Time & |
time | ) |
|
|
static |
Retrieve bitefficient encoding for base time
Definition at line 39 of file bitefficient_format.cpp.
42 std::string time = baseTime.toString(base::Time::Milliseconds);
46 boost::erase_all(time,
":");
47 boost::erase_all(time,
"-");
50 time.insert(14,
sizeof(
char),
'0');
◆ getBinDate() [2/2]
| std::string fipa::acl::BitefficientFormat::getBinDate |
( |
const std::string & |
date1 | ) |
|
|
static |
takes the string representing the date and passes it's digits 2 by 2(as length 2 sugstrings) to the byte encoding function it did not explicitly specify but it was induced from the way it was stated that the date is to be encoded as a coded number(comment 9 of the specification)
Definition at line 55 of file bitefficient_format.cpp.
59 for (i = 0; i < date1.length(); i = i + 2)
◆ getBinDateTimeToken() [1/2]
| std::string fipa::acl::BitefficientFormat::getBinDateTimeToken |
( |
const std::string & |
date1 | ) |
|
|
static |
implements the date time token production of the grammar; not complete(w.r.t. the specification) in functionality implementing the messages without the rest of the architecture makes it difficult to anticipate when and how some productions may/will be used so only a few of the productions were implemented and the char parameter was added to choose between them, as no other decission maker/constraint was identified
Definition at line 29 of file bitefficient_format.cpp.
◆ getBinDateTimeToken() [2/2]
| std::string fipa::acl::BitefficientFormat::getBinDateTimeToken |
( |
const base::Time & |
time | ) |
|
|
static |
implements the date time token production of the grammar; not complete(w.r.t. the specification) in functionality implementing the messages without the rest of the architecture makes it difficult to anticipate when and how some productions may/will be used so only a few of the productions were implemented and the char parameter was added to choose between them, as no other decission maker/constraint was identified
Definition at line 34 of file bitefficient_format.cpp.
◆ getBinNumber()
| std::string fipa::acl::BitefficientFormat::getBinNumber |
( |
uint32_t |
number, |
|
|
bool |
asHex = false |
|
) |
| |
|
static |
Retrieve number string
Definition at line 151 of file bitefficient_format.cpp.
156 encoded += char(0x13);
158 encoded += char(0x12);
161 std::stringstream ss;
◆ getBinStringNoCodetable()
| static std::string fipa::acl::BitefficientFormat::getBinStringNoCodetable |
( |
const std::string & |
sword | ) |
|
|
inlinestatic |
◆ getByteLengthEncodedString()
| std::string fipa::acl::BitefficientFormat::getByteLengthEncodedString |
( |
const std::string & |
sword | ) |
|
|
static |
Definition at line 15 of file bitefficient_format.cpp.
17 char digitString[100];
18 int digit = sword.size();
19 snprintf(digitString,100,
"#%d%c",digit,
'\"');
21 return digitString + sword;
◆ getCodedNaturalNumber()
| std::string fipa::acl::BitefficientFormat::getCodedNaturalNumber |
( |
const std::string & |
cn | ) |
|
|
static |
Allow proper generation of natural numbers, will remove any leading zeros.
Definition at line 101 of file bitefficient_format.cpp.
107 size_t decimal_size = cn.length();
109 for(i = 0; i < decimal_size; ++i)
114 case '0': code += char(0x01);
break;
115 case '1': code += char(0x02);
break;
116 case '2': code += char(0x03);
break;
117 case '3': code += char(0x04);
break;
118 case '4': code += char(0x05);
break;
119 case '5': code += char(0x06);
break;
120 case '6': code += char(0x07);
break;
121 case '7': code += char(0x08);
break;
122 case '8': code += char(0x09);
break;
123 case '9': code += char(0x0a);
break;
◆ getCodedNumber()
| std::string fipa::acl::BitefficientFormat::getCodedNumber |
( |
const std::string & |
cn | ) |
|
|
static |
implements a coded number passed as a string it goes through it digit by digit(char by char)
Definition at line 67 of file bitefficient_format.cpp.
72 size_t decimal_size = cn.length();
74 for(i = 0; i < decimal_size; i++)
76 if ((cn[i]>=
'0') && (cn[i]<=
'9')) code = char(code + 1 +
int(cn[i]) - 48);
77 if (cn[i] ==
'+') code = char(code + 12);
78 if ((cn[i] ==
'E') || (cn[i] ==
'e')) code = char(code + 13);
79 if (cn[i] ==
'-') code = char(code + 14);
80 if (cn[i] ==
'.') code = char(code + 15);
91 if (decimal_size % 2 != 0)
◆ getDigits() [1/2]
| static std::string fipa::acl::BitefficientFormat::getDigits |
( |
const std::string & |
numberString | ) |
|
|
inlinestatic |
◆ getDigits() [2/2]
| std::string fipa::acl::BitefficientFormat::getDigits |
( |
uint32_t |
number | ) |
|
|
static |
◆ getEOFCollection()
| static char fipa::acl::BitefficientFormat::getEOFCollection |
( |
| ) |
|
|
inlinestatic |
◆ getEOFEnvelope()
| static char fipa::acl::BitefficientFormat::getEOFEnvelope |
( |
| ) |
|
|
inlinestatic |
◆ getNullTerminatedString()
| std::string fipa::acl::BitefficientFormat::getNullTerminatedString |
( |
const std::string & |
sword | ) |
|
|
static |
◆ getReceivedObject()
| std::string fipa::acl::BitefficientFormat::getReceivedObject |
( |
const ReceivedObject & |
object | ) |
|
|
static |
Retrieve encoded received object
Definition at line 194 of file bitefficient_format.cpp.
201 std::string from = receivedObject.getFrom();
207 std::string
id = receivedObject.getId();
213 std::string via = receivedObject.getVia();
220 std::vector<UserdefParam>::const_iterator cit = list.begin();
221 for(; cit != list.end(); ++cit)
228 return receivedObjectString;
std::vector< UserdefParam > UserdefinedParameterList
◆ getString()
| std::string fipa::acl::BitefficientFormat::getString |
( |
const std::string & |
sword | ) |
|
|
static |
The documentation for this class was generated from the following files: