Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

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
On this page

Codec Development

Updated on 2022-02-24 GMT+08:00

Overview

When a device reports data, if Data Type is Binary, a codec needs to be developed for the product. If Data Type is JSON, codec development is not required.

For example, in the NB-IoT scenario where devices communicate with the IoT platform using CoAP, the payload of the CoAP message is the data at the application layer and the data type is defined by the device. As NB-IoT devices have demanding requirements on power saving, data at the application layer is in binary format instead of JSON format. However, the IoT platform communicates with NAs by sending data in JSON format. Therefore, codec development is needed for the IoT platform to convert data in binary and JSON formats.

Developing a Codec

When you are Customizing a Product, if the system template is used, you can directly use or modify the codecs contained in some of the templates. If you choose to customize a product, you need to develop a complete codec. The development process is as follows:

  1. In the product development space, click Codec Development.

  2. In the Online Codec Editor area, click Add Message.

  3. In the Add Message dialog box displayed, specify Message Name, set Message Type to Data Reporting, and click OK.

    • If the IoT platform is required to return an ACK message after the device reports data, Add Response Field must be selected. The data carried in the ACK message can be configured in Response. The default value is AAAA0000.
    • Message Name can contain only letters, digits, underscores (_), and dollar signs ($) and cannot start with a digit.

  4. Click + next to Data Reporting Fields.

  5. In the Add Field dialog box displayed, select Tagged as address field and other parameters will be set automatically. Then, click OK.

    When messages of the same type are created, such as two data reporting messages, this option must be selected and this field in every such message must be in the same place on the field list. Command response can be regarded as a type of data reporting message. Therefore, if a command response exists, an address field needs to be added to the data reporting message.

  6. Click + next to Data Reporting Fields.

  7. In the Add Field dialog box displayed, set the parameters and click OK.

    • Name can contain only letters, digits, underscores (_), and dollar signs ($) and cannot start with a digit.
    • Data Type is configured based on the data reported by the device and must match the type of the corresponding field defined by the profile.

  8. In the Online Codec Editor area, click Add Message.

  9. In the Add Message dialog box displayed, specify Message Name, set Message Type to Command Delivery, and click OK.

    • If the device is required to return the command execution result, select Add Response Field. After the check box is selected:
      • The address field must be defined 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 field list, so that the codec can distinguish the data reporting message from the command response.
      • The response ID field must be defined in the command delivery message and the command response, and this field in the two messages must be in the same place on the field list, so that the codec can associate the command delivery message with the corresponding command response.
    • Message Name can contain only letters, digits, underscores (_), and dollar signs ($) and cannot start with a digit.

  10. Click + next to Command Delivery Fields.

  11. In the Add Field dialog box displayed, select Tagged as address field and other parameters will be set automatically. Then, click OK.

    When messages of the same type are created, such as two command delivery messages, this option must be selected and this field in every such message must be in the same place on the field list. Data reporting response can be regarded as a type of command delivery message. Therefore, if a data reporting response exists, an address field needs to be added to the command delivery message.

  12. Click + next to Command Delivery Fields.

  13. In the Add Field dialog box displayed, select Tagged as response ID field and other parameters will be set automatically. Then, click OK.

  14. Click + next to Command Delivery Fields.

  15. In the Add Field dialog box displayed, set the parameters and click OK.

    • Name can contain only letters, digits, underscores (_), and dollar signs ($) and cannot start with a digit.
    • Data Type is configured based on the data reported by the device and must match the type of the corresponding field defined by the profile.

  16. Click + next to Response Fields.

  17. In the Add Field dialog box displayed, select Tagged as address field and other parameters will be set automatically. Then, click OK.

  18. Click + next to Response Fields.

  19. In the Add Field dialog box displayed, select Tagged as response ID field and other parameters will be set automatically. Then, click OK.

  20. Click + next to Response Fields.

  21. In the Add Field dialog box displayed, select Tagged as command execution state field, set the parameters, and click OK.

    • The value of Name is automatically populated.
    • Data Type is configured according to the actual command response and must match the type of the corresponding field defined by the profile.

  22. Click + next to Response Fields.

  23. In the Add Field dialog box displayed, set the parameters and click OK.

    • Name can contain only letters, digits, underscores (_), and dollar signs ($) and cannot start with a digit.
    • Data Type is configured based on the data reported by the device and must match the type defined by the profile.

  24. Map the property fields, command fields, and response fields in Device Model on the right with the corresponding fields in the data reporting message, command delivery message, and command response.

  25. Click Save and then Deploy to deploy the codec on the IoT platform.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback