Skip to content

Commit e7db0b3

Browse files
committed
fix(plc4go): fix compile issues with imports and typos
1 parent 277b3d8 commit e7db0b3

8 files changed

Lines changed: 40 additions & 31 deletions

File tree

code-generation/language/go/src/main/resources/templates/go/data-io-template.go.ftlh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ func ${type.name}ParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe
182182
|| ((case.name == "LDATE") && (simpleField.name == "nanosecondsSinceEpoch"))
183183
|| ((case.name == "TIME_OF_DAY") && (simpleField.name == "millisecondsSinceMidnight"))
184184
|| ((case.name == "LTIME_OF_DAY") && (simpleField.name == "nanosecondsSinceMidnight"))
185-
|| ((case.name == "DATE_AND_TIME") && (simpleField.name == "secondsSinceEpoch"))
185+
|| ((case.name == "DATE_AND_TIME") && (
186+
(simpleField.name == "secondsSinceEpoch")
187+
|| (simpleField.name == "nanosecondsOfSecond")
188+
)
189+
)
186190
|| ((case.name == "DATE_AND_LTIME") && (
187191
(simpleField.name == "year")
188192
|| (simpleField.name == "month")
@@ -191,7 +195,7 @@ func ${type.name}ParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe
191195
|| (simpleField.name == "minutes")
192196
|| (simpleField.name == "seconds")
193197
|| (simpleField.name == "nanoseconds")
194-
|| (simpleField.name == "nannosecondsOfSecond")
198+
|| (simpleField.name == "nanosecondsOfSecond")
195199
|| (simpleField.name == "nanosecondsSinceEpoch")
196200
|| (simpleField.name == "dayOfWeek")
197201
)

plc4go/protocols/knxnetip/readwrite/model/KnxDatapoint.go

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plc4go/protocols/s7/readwrite/model/DataItem.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plc4go/protocols/simulated/readwrite/model/DataItem.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plc4go/spi/values/PlcDATE_AND_TIME.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ func (m PlcDATE_AND_TIME) GetMillisecondsOfSecond() uint64 {
9797
return uint64(time.Duration(m.GetNanoseconds()).Milliseconds())
9898
}
9999

100+
func (m PlcDATE_AND_TIME) GetNanosecondsOfSecond() uint64 {
101+
return uint64(time.Duration(m.GetNanoseconds()))
102+
}
103+
100104
func (m PlcDATE_AND_TIME) IsDateTime() bool {
101105
return true
102106
}

protocols/knxnetip/src/main/generated/protocols/knxnetip/knx-master-data.mspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@
16641664
[simple uint 8 hour ]
16651665
[simple uint 8 minutes ]
16661666
[simple uint 8 seconds ]
1667-
[simple uint 32 nannosecondsOfSecond]
1667+
[simple uint 32 nanosecondsOfSecond]
16681668
]
16691669
['DT' DATE_AND_TIME
16701670
[reserved uint 8 '0x00' ]
@@ -1675,7 +1675,7 @@
16751675
[simple uint 8 hour ]
16761676
[simple uint 8 minutes ]
16771677
[simple uint 8 seconds ]
1678-
[simple uint 32 nannosecondsOfSecond]
1678+
[simple uint 32 nanosecondsOfSecond]
16791679
]
16801680
16811681

protocols/knxnetip/src/main/xslt/knx-types.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
[simple uint 8 hour ]
225225
[simple uint 8 minutes ]
226226
[simple uint 8 seconds ]
227-
[simple uint 32 nannosecondsOfSecond]
227+
[simple uint 32 nanosecondsOfSecond]
228228
]
229229
['DT' DATE_AND_TIME
230230
[reserved uint 8 '0x00' ]
@@ -235,7 +235,7 @@
235235
[simple uint 8 hour ]
236236
[simple uint 8 minutes ]
237237
[simple uint 8 seconds ]
238-
[simple uint 32 nannosecondsOfSecond]
238+
[simple uint 32 nanosecondsOfSecond]
239239
]
240240

241241
<xsl:for-each select="knx:KNX/knx:MasterData/knx:DatapointTypes/knx:DatapointType/knx:DatapointSubtypes/knx:DatapointSubtype">

protocols/s7/src/main/resources/protocols/s7/s7.mspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@
872872
// One byte representing 00 - 59
873873
[simple uint 8 seconds ]
874874
// Four byte with 3 4-bit values representing 0 - 999
875-
[simple uint 32 nannosecondsOfSecond ]
875+
[simple uint 32 nanosecondsOfSecond ]
876876
]
877877
]
878878
]

0 commit comments

Comments
 (0)