El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Codecs

Updated on 2025-03-03 GMT+08:00

How Can I Develop Codecs?

The IoT platform supports the codec online development. For details, see Online Development.

What Is the Code Rule for Fields of the string and varstring Types?

If Data Type of a field is string(string type) or varstring(variable-length string), the codec performs encoding and decoding using ACSII.

For details on the codec online development, see Codec for Strings and Variable-Length Strings.

Figure 1 Data type example 1

What Is the Code Rule for Fields of the array and variant Types?

If Data Type is array(array type) or variant(variable-length array type), the codec performs encoding and decoding using Base64. For details on the codec online development, see Codec for Arrays and Variable-Length Arrays.

Figure 2 Data type example 2

How Do I Use messageId During Online Codec Development?

When messages of the same type are created, such as two data reporting messages, messageId must be configured to distinguish these messages and this parameter in each message must be in the same place on the list. The messageId field applies to the following scenarios:

  • There are two or more data reporting messages or command delivery messages.
  • A command response can be regarded as a type of data reporting message. Therefore, if a command response exists, messageId must be added to the data reporting message.
  • A data reporting response can be regarded as a type of command delivery message. Therefore, if a data reporting response exists, messageId must be added to the command delivery message.

How Do I Configure a Command Delivery Response During Online Codec Development?

After receiving a command, a device sends an ACK message or a command delivery response. The ACK message indicates that the command has reached the device, and the command delivery response indicates the command execution result. If the device needs to return a command delivery response after receiving the command, the messageId and mid fields must be configured:
  • messageId must be configured in both the data reporting message and the command response, and this field in the two messages must be in the same place on the list, so that the codec can distinguish between the two.
  • mid must be configured in the command delivery message and the command response, and this field in the two messages must be in the same place on the list, so that the codec can associate the two.

What Do I Do If a Codec That Was Developed Online Fails to Be Deployed?

Description:

You develop a codec on the development page and click Deploy. The deployment fails.

Possible Causes:

  1. If the codec is successfully downloaded but fails to be deployed, there may be network issues.
  2. If the codec fails to be downloaded, the possible causes are as follows:
    • The value of messageId in the messages of the same type (for example, two data reporting messages) is duplicate or their positions in the messages are different.
    • Data Type is not set to int for messageId.
    • The default value of a field is not in hexadecimal format.
    • A field name contains a Java keyword, for example, type or int.

Solutions:

  1. If the codec is successfully downloaded but fails to be deployed, check the network status and try again.
  2. If the codec fails to be downloaded, check whether the codec definition meets the requirements.

What Do I Do If a Script-based Codec or a Codec Developed Offline Fails in Encoding or Decoding?

  • For a script-based codec, choose Products > Codec Development > Edit Script to debug the codec and modify the codec based on the debugging result.
  • For a codec developed offline, debug the codec using the codec test tool and modify the codec based on the test result.

What Do I Do If a Codec That Was Developed Offline Fails to Be Deployed?

  1. Use the IoT codec test tool to check the codec.
  2. Rectify the fault based on the error code returned by the tool. For details on how to handle different errors, see User Guide for IoT Codec Test Tool in the tool package.

What Do I Do If a Codec That Was Developed Offline Fails to Be Uploaded?

Codecs that are developed offline must be checked before being uploaded to the IoT platform. Use the IoT codec test tool to check the codec package and rectify the fault based on the error message.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback