Class CodecController
- java.lang.Object
-
- com.cumulocity.microservice.lpwan.codec.rest.CodecController
-
@RestController public class CodecController extends Object
The CodecController is a rest controller that defines the endpoints.
-
-
Constructor Summary
Constructors Constructor Description CodecController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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
-
-
-
Method Detail
-
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:
DecoderServiceException
-
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:
EncoderServiceException
-
-