-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Fast DDS-Gen documentation [8708] (#165)
* Refs #8644: Restructured and updated according to the installation section. * Refs #8644: Updated introduction. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Updated simple pub/sub application. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Added IDL data types section. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Added usage section. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Added Fast DDS-Gen CodeTester. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Updated directories, rst files and hyperlinks to fastddsgen. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Changed Fast DDS-Gen to italics. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Applied suggested changes. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Added IDL comments subsection. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Fixed minor typos. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Added windows dependencies and applied suggested changes. Signed-off-by: RaulSanchez <raul@eprosima.com> * Refs #8644: Added a reference to the fastddsgen tutorial in getting started. Signed-off-by: RaulSanchez <raul@eprosima.com> Co-authored-by: RaulSanchez <raul@eprosima.com>
- Loading branch information
1 parent
3fac664
commit e43063b
Showing
27 changed files
with
801 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
#include <stdint.h> | ||
#include <string> | ||
#include <bitset> | ||
|
||
using octet = unsigned char; | ||
|
||
// STRUCTURES_DATA_TYPE | ||
class Structure | ||
{ | ||
public: | ||
Structure(); | ||
~Structure(); | ||
Structure(const Structure &x); | ||
Structure(Structure &&x); | ||
Structure& operator=(const Structure &x); | ||
Structure& operator=(Structure &&x); | ||
|
||
void octet_value(uint8_t _octet_value); | ||
uint8_t octet_value() const; | ||
uint8_t& octet_value(); | ||
void long_value(int64_t _long_value); | ||
int64_t long_value() const; | ||
int64_t& long_value(); | ||
void string_value(const std::string | ||
&_string_value); | ||
void string_value(std::string &&_string_value); | ||
const std::string& string_value() const; | ||
std::string& string_value(); | ||
|
||
private: | ||
uint8_t m_octet_value; | ||
int64_t m_long_value; | ||
std::string m_string_value; | ||
}; | ||
//! | ||
|
||
// STRUCTURE_INHERITANCE | ||
class ParentStruct | ||
{ | ||
octet parent_member; | ||
}; | ||
|
||
class ChildStruct : public ParentStruct | ||
{ | ||
long child_member; | ||
}; | ||
//! | ||
|
||
|
||
// UNION_DATA_TYPE | ||
class Union | ||
{ | ||
public: | ||
Union(); | ||
~Union(); | ||
Union(const Union &x); | ||
Union(Union &&x); | ||
Union& operator=(const Union &x); | ||
Union& operator=(Union &&x); | ||
|
||
void d(int32_t __d); | ||
int32_t _d() const; | ||
int32_t& _d(); | ||
|
||
void octet_value(uint8_t _octet_value); | ||
uint8_t octet_value() const; | ||
uint8_t& octet_value(); | ||
void long_value(int64_t _long_value); | ||
int64_t long_value() const; | ||
int64_t& long_value(); | ||
void string_value(const std::string | ||
&_string_value); | ||
void string_value(std:: string &&_string_value); | ||
const std::string& string_value() const; | ||
std::string& string_value(); | ||
|
||
private: | ||
int32_t m__d; | ||
uint8_t m_octet_value; | ||
int64_t m_long_value; | ||
std::string m_string_value; | ||
}; | ||
//! | ||
|
||
// BITSET_DATA_TYPE | ||
class MyBitset | ||
{ | ||
public: | ||
void a(char _a); | ||
char a() const; | ||
|
||
void b(uint16_t _b); | ||
uint16_t b() const; | ||
|
||
void c(int32_t _c); | ||
int32_t c() const; | ||
|
||
private: | ||
std::bitset<25> m_bitset; | ||
}; | ||
//! | ||
|
||
// BITSET_INHERITANCE | ||
class ParentBitset | ||
{ | ||
std::bitset<3> parent_member; | ||
}; | ||
|
||
class ChildBitset : public ParentBitset | ||
{ | ||
std::bitset<10> child_member; | ||
}; | ||
//! | ||
|
||
// ENUMERATION_DATA_TYPE | ||
enum Enumeration : uint32_t | ||
{ | ||
RED, | ||
GREEN, | ||
BLUE | ||
}; | ||
//! | ||
|
||
// BITMASK_DATA_TYPE | ||
enum MyBitMask : uint8_t | ||
{ | ||
flag0 = 0x01 << 0, | ||
flag1 = 0x01 << 1, | ||
flag4 = 0x01 << 4, | ||
flag6 = 0x01 << 6, | ||
flag7 = 0x01 << 7 | ||
}; | ||
//! | ||
|
||
/* | ||
// INCLUDE_MORE_IDL_FILES | ||
#include "OtherFile.idl" | ||
#include <AnotherFile.idl> | ||
//! | ||
/**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.