You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/08/19 10:36:39 UTC
[plc4x] branch develop updated: feat(plc4go): added missing duration calls to plc_value
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new b7fb8cf99 feat(plc4go): added missing duration calls to plc_value
b7fb8cf99 is described below
commit b7fb8cf995de0a99700c16a31d6b98891d3a885c
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Aug 19 12:36:27 2022 +0200
feat(plc4go): added missing duration calls to plc_value
---
plc4go/pkg/api/values/plc_value.go | 2 ++
plc4go/spi/values/PlcSimpleValueAdapter.go | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/plc4go/pkg/api/values/plc_value.go b/plc4go/pkg/api/values/plc_value.go
index a60bf598d..368829f71 100644
--- a/plc4go/pkg/api/values/plc_value.go
+++ b/plc4go/pkg/api/values/plc_value.go
@@ -95,6 +95,8 @@ type PlcValue interface {
IsTime() bool
GetTime() time.Time
+ IsDuration() bool
+ GetDuration() time.Duration
IsDate() bool
GetDate() time.Time
IsDateTime() bool
diff --git a/plc4go/spi/values/PlcSimpleValueAdapter.go b/plc4go/spi/values/PlcSimpleValueAdapter.go
index 0caa9a2b4..2ec4bbe7f 100644
--- a/plc4go/spi/values/PlcSimpleValueAdapter.go
+++ b/plc4go/spi/values/PlcSimpleValueAdapter.go
@@ -63,19 +63,19 @@ func (m PlcSimpleNumericValueAdapter) IsUint64() bool {
return true
}
-func (m PlcSimpleNumericValueAdapter) IsUnt8() bool {
+func (m PlcSimpleNumericValueAdapter) IsInt8() bool {
return true
}
-func (m PlcSimpleNumericValueAdapter) IsUnt16() bool {
+func (m PlcSimpleNumericValueAdapter) IsInt16() bool {
return true
}
-func (m PlcSimpleNumericValueAdapter) IsUnt32() bool {
+func (m PlcSimpleNumericValueAdapter) IsInt32() bool {
return true
}
-func (m PlcSimpleNumericValueAdapter) IsUnt64() bool {
+func (m PlcSimpleNumericValueAdapter) IsInt64() bool {
return true
}