Vector BLF: DistributedObjectMember.h Source File

Vector BLF

Loading...
Searching...
No Matches
DistributedObjectMember.h
1// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <tobias.lorenz@gmx.net>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Vector/BLF/platform.h>
8
9#include <vector>
10
11#include <Vector/BLF/AbstractFile.h>
12#include <Vector/BLF/ObjectHeader.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16namespace Vector {
17namespace BLF {
18
20 struct VECTOR_BLF_EXPORT DistributedObjectMember final : ObjectHeader {
21 DistributedObjectMember();
22
23 void read(AbstractFile & is) override;
24 void write(AbstractFile & os) override;
25 uint32_t calculateObjectSize() const override;
26
28 enum MemberType : uint32_t {
29 MemberTypeInvalid = 0,
30 MemberTypeData = 1,
31 MemberTypeMethod = 2,
32 MemberTypeField = 3,
33 MemberTypeEvent = 4,
34 MemberTypeRefMember = 5,
35 MemberTypeRefObject = 6,
36 MemberTypeBindingError = 7
37 };
38
40 enum DetailType : uint32_t {
41 DetailTypeInvalid = 0,
42 DetailTypeValue = 1,
43 DetailTypeFunctionCall = 2,
44 DetailTypeFunctionReturn = 3,
45 DetailTypeFunctionDefaults = 4,
46 DetailTypeSubscriptionState = 5,
47 DetailTypeAnnouncementState = 6,
48 DetailTypeReferencePath = 7,
49 DetailTypeBindingError = 8
50 };
51
52 /* static */
53
55 uint32_t memberType {MemberType::MemberTypeInvalid};
56
58 uint32_t detailType {DetailType::DetailTypeInvalid};
59
61 uint32_t pathLength;
62
64 uint32_t dataLength;
65
66 /* dynamic */
67
69 std::string path;
70
72 std::vector<uint8_t> data;
73};
74
75}
76}
Vector::BLF::AbstractFile
Definition: AbstractFile.h:19
Vector::BLF::DistributedObjectMember
Distributed object member (communication setup)
Definition: DistributedObjectMember.h:20
Vector::BLF::DistributedObjectMember::pathLength
uint32_t pathLength
length of variable name in bytes
Definition: DistributedObjectMember.h:61
Vector::BLF::DistributedObjectMember::MemberType
MemberType
type of the distributed object member
Definition: DistributedObjectMember.h:28
Vector::BLF::DistributedObjectMember::path
std::string path
path of the distributed object member
Definition: DistributedObjectMember.h:69
Vector::BLF::DistributedObjectMember::data
std::vector< uint8_t > data
variable data
Definition: DistributedObjectMember.h:72
Vector::BLF::DistributedObjectMember::DetailType
DetailType
detail type of the distributed object
Definition: DistributedObjectMember.h:40
Vector::BLF::DistributedObjectMember::dataLength
uint32_t dataLength
length of variable data in bytes
Definition: DistributedObjectMember.h:64
Vector::BLF::ObjectHeader
Object header.
Definition: ObjectHeader.h:22