Skip to main content

IAutelConverter

class IAutelConverter

Description: Interface layer (outer layer) object and protocol layer (lower layer) object converter

method getParameterMessageType

     fun getParameterMessageType(): DroneBaseParamModel.DroneParameterType

Description: Parameter data type (refers to the data type agreed by the protocol layer)

Input parameters: None.

Output parameter: Returns drone param type.

Related parameters: None.

method getJsonStr

     open fun getJsonStr(): String?

Description: Object to json, mainly used for debugging tools.

Input parameters: None.

Output parameter: Returns json string.

Related parameters: None.

method fromJsonStr

      open fun fromJsonStr(str: String): T?

Description: Convert json to object, mainly used for debugging tools.

Input parameters: str: json data.

Output parameter: None.

Related parameters: None.

method pack

      open fun pack(bean: T): Any?

Description: Convert interface layer objects into protocol layer objects.

Input parameters: bean: any kind og bean object.

Output parameter: None.

Related parameters: None.

method unpack

      abstract fun unpack(message: Any?): T?

Description: Convert protocol layer object to interface layer object.

Input parameters: message.

Output parameter: Returns object of T.

Related parameters: None.

method validData

      open fun validData(bean: T): AutelStatusCode

Description: Verify whether the data is valid.

Input parameters: bean: any kind og bean object.

Output parameter: Returns autel status.

Related parameters: None.