-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
181 additions
and
74 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
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,19 @@ | ||
#include "dpt8.h" | ||
|
||
#include "dptconvert.h" | ||
|
||
Knx::Go_SizeCode Knx::Dpt8::size() const | ||
{ | ||
return Go_2_Octets; | ||
} | ||
|
||
void Knx::Dpt8::encode(uint8_t* data) const | ||
{ | ||
signed16ToPayload(data, 0, _value, 0xFFFF); | ||
} | ||
|
||
bool Knx::Dpt8::decode(uint8_t* data) | ||
{ | ||
_value = signed16FromPayload(data, 0); | ||
return true; | ||
} |
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,25 @@ | ||
#pragma once | ||
#include "dpt.h" | ||
namespace Knx | ||
{ | ||
class Dpt8: public ValueDpt<int16_t> | ||
{ | ||
public: | ||
Dpt8() {}; | ||
Dpt8(int16_t value) : ValueDpt(value) {} | ||
Go_SizeCode size() const override; | ||
|
||
void encode(uint8_t* data) const override; | ||
bool decode(uint8_t* data) override; | ||
}; | ||
|
||
typedef Dpt8 DPT_Value_2_Count; | ||
typedef Dpt8 DPT_DeltaTimeMsec; | ||
typedef Dpt8 DPT_DeltaTime10MSec; | ||
typedef Dpt8 DPT_DeltaTime100MSec; | ||
typedef Dpt8 DPT_DeltaTimeSec; | ||
typedef Dpt8 DPT_DeltaTimeMin; | ||
typedef Dpt8 DPT_DeltaTimeHrs; | ||
typedef Dpt8 DPT_Percent_V16; | ||
typedef Dpt8 DPT_Rotation_Angle; | ||
} |
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
#include "dpt5.h" | ||
#include "dpt6.h" | ||
#include "dpt7.h" | ||
#include "dpt8.h" | ||
#include "dpt9.h" |