-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FDP-2551 Firmware update added #41
Conversation
Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Jasper Kamerling <[email protected]> Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Loes Immens <[email protected]> Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Loes Immens <[email protected]> Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Sander van der Heijden <[email protected]> Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Sander Verbruggen <[email protected]>
4f6b0ca
to
de75e04
Compare
Signed-off-by: Sander Verbruggen <[email protected]>
- messages are no longer read from files, but from DeviceMessage - Simulator state is kept across messages (but not persisted over restarts) - Message is updated with this simulator state before sending - Simulator emulates the capacitor; after 5 messages it takes a break Signed-off-by: Sander Verbruggen <[email protected]>
Can't predict the order and exact content, simplified to just check for a known property in the message Signed-off-by: Sander Verbruggen <[email protected]>
e3f7d37
to
490ea18
Compare
|
||
import org.gxf.crestdevicesimulator.simulator.message.DeviceMessageDownlink | ||
|
||
class SimulatorState(val deviceId: String, var fotaMessageCounter: Int = 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deviceId is not used
} | ||
} | ||
} | ||
|
||
fun createMessage(resource: Resource): JsonNode = mapper.readTree(resource.inputStream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapper property can be removed
} | ||
pskService.isPendingKeyPresent() -> { | ||
// Use new PSK with the next message, not in a response to the setter-msg TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment? :)
Signed-off-by: Sander Verbruggen <[email protected]>
...cation/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/message/CrestNamingStrategy.kt
Outdated
Show resolved
Hide resolved
...n/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/handlers/CommandHandler.kt
Outdated
Show resolved
Hide resolved
import org.eclipse.californium.core.CoapResponse | ||
import org.gxf.crestdevicesimulator.simulator.data.entity.SimulatorState | ||
|
||
fun interface CommandHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe overkill, maybe interesting: we might look into a state machine library such as KStateMachine
Signed-off-by: Sander Verbruggen <[email protected]>
Signed-off-by: Sander Verbruggen <[email protected]>
|
No description provided.