1
0
Fork 0

PDU for rdmnet protocols

This commit is contained in:
Kevin Matz 2021-08-12 13:46:25 -04:00
parent 9605766ddb
commit ea9b7f909d
8 changed files with 496 additions and 2 deletions

View File

@ -75,11 +75,14 @@ set(SOURCE_FILES
rdmnet/controller.cpp
rdmnet/device.h
rdmnet/device.cpp
rdmnet/ept.cpp
rdmnet/ept.h
rdmnet/llrp.cpp
rdmnet/llrp.h
rdmnet/manager.h
rdmnet/manager.cpp
rdmnet/rdmnet.h
rdmnet/rpt.cpp
rdmnet/rpt.h
rdmnet/target.h
rdmnet/target.cpp

View File

@ -28,7 +28,7 @@ namespace RDMnet {
namespace BrokerProtocol {
/**
* @brief Pdu::Pdu
* @brief BrokerProtocol::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(2)
@ -37,7 +37,7 @@ Pdu::Pdu()
/**
* @brief Pdu::iStream
* @brief BrokerProtocol::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)

93
rdmnet/ept.cpp Normal file
View File

@ -0,0 +1,93 @@
/*
ept.cpp
Copyright (c) 2021 Kevin Matz (kevin.matz@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "ept.h"
namespace RDMnet {
namespace EPT {
/**
* @brief EPT::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(4)
{
}
/**
* @brief EPT::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
namespace DATA {
/**
* @brief EPT::DATA::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(4)
{
}
/**
* @brief EPT::DATA::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace DATA
namespace STATUS {
/**
* @brief EPT::STATUS::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(2)
{
}
/**
* @brief EPT::STATUS::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace STATUS
} // namespace EPT
} // namespace RDMnet

View File

@ -23,6 +23,8 @@
*/
#pragma once
#include "acn/pdu.h"
namespace RDMnet {
namespace EPT {
@ -36,5 +38,47 @@ namespace EPT {
*/
/**
* @brief The EPT::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
namespace DATA {
/**
* @brief The EPT::DATA::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace DATA
namespace STATUS {
/**
* @brief The EPT::STATUS::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace STATUS
} // namespace EPT
} // namespace RDMnet

93
rdmnet/llrp.cpp Normal file
View File

@ -0,0 +1,93 @@
/*
llrp.cpp
Copyright (c) 2021 Kevin Matz (kevin.matz@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "llrp.h"
namespace RDMnet {
namespace LLRP {
/**
* @brief LLRP::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(4)
{
}
/**
* @brief LLRP::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
namespace ProbeRequest {
/**
* @brief LLRP::ProbeRequest::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(1)
{
}
/**
* @brief LLRP::ProbeRequest::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace ProbeRequest
namespace ProbeReply {
/**
* @brief LLRP::ProbeReply::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(1)
{
}
/**
* @brief LLRP::ProbeReply::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace ProbeReply
} // namespace LLRP
} // namespace RDMnet

View File

@ -23,6 +23,8 @@
*/
#pragma once
#include "acn/pdu.h"
namespace RDMnet {
namespace LLRP {
@ -36,5 +38,50 @@ namespace LLRP {
* large network.
*/
/**
* @brief The LLRP::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
namespace ProbeRequest {
/**
* @brief The LLRP::ProbeRequest::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace ProbeRequest
namespace ProbeReply {
/**
* @brief The LLRP::ProbeReply::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace ProbeReply
} // namespace LLRP
} // namespace RDMnet

138
rdmnet/rpt.cpp Normal file
View File

@ -0,0 +1,138 @@
/*
rpt.cpp
Copyright (c) 2021 Kevin Matz (kevin.matz@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "rpt.h"
namespace RDMnet {
namespace RPT {
/**
* @brief RPT::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(4)
{
}
/**
* @brief RPT::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
namespace REQUEST {
/**
* @brief RPT::REQUEST::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(1)
{
}
/**
* @brief RPT::REQUEST::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace DATA
namespace STATUS {
/**
* @brief RPT::STATUS::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(2)
{
}
/**
* @brief RPT::STATUS::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace STATUS
namespace NOTIFICATION {
/**
* @brief RPT::NOTIFICATION::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(1)
{
}
/**
* @brief RPT::NOTIFICATION::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace NOTIFICATION
namespace COMMAND {
/**
* @brief RPT::COMMAND::Pdu::Pdu
*/
Pdu::Pdu()
: ACN::PDU::Pdu(1)
{
}
/**
* @brief RPT::COMMAND::Pdu::iStream
* @param stream
*/
void Pdu::iStream([[maybe_unused]] ACN::PDU::Stream stream)
{
}
} // namespace COMMAND
} // namespace RPT
} // namespace RDMnet

View File

@ -23,6 +23,8 @@
*/
#pragma once
#include "acn/pdu.h"
namespace RDMnet {
namespace RPT {
@ -38,5 +40,79 @@ namespace RPT {
*/
/**
* @brief The RPT::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
namespace REQUEST {
/**
* @brief The RPT::REQUEST::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace REQUEST
namespace STATUS {
/**
* @brief The RPT::STATUS::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace STATUS
namespace NOTIFICATION {
/**
* @brief The RPT::NOTIFICATION::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace NOTIFICATION
namespace COMMAND {
/**
* @brief The RPT::COMMAND::Pdu class
*/
class Pdu
: public ACN::PDU::Pdu
{
public:
Pdu();
void iStream(ACN::PDU::Stream) override;
};
} // namespace COMMAND
} // namespace RPT
} // namespace RDMnet