-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1939 from peternewman/e1.33-cherry-pick
E1.33 cherry pick
- Loading branch information
Showing
19 changed files
with
828 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU 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 Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* ACNFlags.h | ||
* Flags used in ACN PDUs | ||
* Copyright (C) 2020 Peter Newman | ||
*/ | ||
|
||
#ifndef INCLUDE_OLA_ACN_ACNFLAGS_H_ | ||
#define INCLUDE_OLA_ACN_ACNFLAGS_H_ | ||
|
||
/** | ||
* @addtogroup acn | ||
* @{ | ||
* @file ACNFlags.h | ||
* @brief ACN flag values. | ||
* @} | ||
*/ | ||
|
||
#include <stdint.h> | ||
|
||
namespace ola { | ||
namespace acn { | ||
|
||
/** | ||
* @addtogroup acn | ||
* @{ | ||
*/ | ||
|
||
// masks for the flag fields | ||
/** | ||
* @brief This indicates a 20 bit length field (default is 12 bits) | ||
*/ | ||
static const uint8_t LFLAG_MASK = 0x80; | ||
|
||
/** | ||
* @brief This indicates a vector is present | ||
*/ | ||
static const uint8_t VFLAG_MASK = 0x40; | ||
|
||
/** | ||
* @brief This indicates a header field is present | ||
*/ | ||
static const uint8_t HFLAG_MASK = 0x20; | ||
|
||
/** | ||
* @brief This indicates a data field is present | ||
*/ | ||
static const uint8_t DFLAG_MASK = 0x10; | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
} // namespace acn | ||
} // namespace ola | ||
|
||
#endif // INCLUDE_OLA_ACN_ACNFLAGS_H_ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU 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 Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* LLRPHeader.h | ||
* The E1.33 LLRP Header | ||
* Copyright (C) 2020 Peter Newman | ||
*/ | ||
|
||
#ifndef LIBS_ACN_LLRPHEADER_H_ | ||
#define LIBS_ACN_LLRPHEADER_H_ | ||
|
||
#include <ola/acn/CID.h> | ||
#include <ola/base/Macro.h> | ||
|
||
#include <stdint.h> | ||
|
||
namespace ola { | ||
namespace acn { | ||
|
||
/* | ||
* Header for the LLRP layer | ||
*/ | ||
class LLRPHeader { | ||
public: | ||
LLRPHeader() | ||
: m_transaction_number(0) { | ||
} | ||
|
||
LLRPHeader(const ola::acn::CID &destination_cid, | ||
uint32_t transaction_number) | ||
: m_destination_cid(destination_cid), | ||
m_transaction_number(transaction_number) { | ||
} | ||
~LLRPHeader() {} | ||
|
||
const ola::acn::CID DestinationCid() const { return m_destination_cid; } | ||
uint32_t TransactionNumber() const { return m_transaction_number; } | ||
|
||
bool operator==(const LLRPHeader &other) const { | ||
return ((m_destination_cid == other.m_destination_cid) && | ||
(m_transaction_number == other.m_transaction_number)); | ||
} | ||
|
||
PACK( | ||
struct llrp_pdu_header_s { | ||
uint8_t destination_cid[CID::CID_LENGTH]; | ||
uint32_t transaction_number; | ||
}); | ||
typedef struct llrp_pdu_header_s llrp_pdu_header; | ||
|
||
private: | ||
ola::acn::CID m_destination_cid; | ||
uint32_t m_transaction_number; | ||
}; | ||
} // namespace acn | ||
} // namespace ola | ||
#endif // LIBS_ACN_LLRPHEADER_H_ |
Oops, something went wrong.