Class CodecController
java.lang.Object
com.cumulocity.microservice.lpwan.codec.rest.CodecController
The CodecController is a rest controller that defines the endpoints.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull DecoderResult
decode
(@NotNull DecoderInputData inputData) This REST API should expose '/decode' endpoint@NotNull EncoderResult
encode
(@NotNull EncoderInputData inputData) This REST API should expose '/encode' endpoint
-
Constructor Details
-
CodecController
public CodecController()
-
-
Method Details
-
decode
@PostMapping(value="/decode", consumes="application/json") @NotNull public @NotNull DecoderResult decode(@RequestBody @NotNull @NotNull DecoderInputData inputData) throws DecoderServiceException This REST API should expose '/decode' endpoint- Parameters:
inputData
- A non-null input parameter that is carries the payload to be decoded along with other supporting elements.- Returns:
- DecoderResult represents the output that carries the measurement(s)/event(s)/alarm(s) to be created and/or the managed object properties to be updated.
- Throws:
DecoderServiceException
- DecoderServiceException- See Also:
-
encode
@PostMapping(value="/encode", consumes="application/json") @NotNull public @NotNull EncoderResult encode(@RequestBody @NotNull @NotNull EncoderInputData inputData) throws EncoderServiceException This REST API should expose '/encode' endpoint- Parameters:
inputData
- A non-null input parameter that carries the command to be encoded- Returns:
- EncoderResult represents the output that carries the encoded hexadecimal command to be executed and/or the accompanying properties like fport
- Throws:
EncoderServiceException
- EncoderServiceException- See Also:
-