Class CodecController


  • @RestController
    public class CodecController
    extends Object
    The CodecController is a rest controller that defines the endpoints.
    • Constructor Detail

      • CodecController

        public CodecController()
    • 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