top gradient image

upRedSun.com Home Site Map
top logo image
top border image

 

Next Steps

Buy Online

Download Trial

-

 

NP-Gear Home

-

Product Brief

Why you need NP-Gear

Key Features

How it Works

-

More Information

Frequently Asked Questions

-

Resources

Technical Support

-

Network Programming Gear

How it Works

 

This article explains in detail how Network Programming Gear works.

 

Step 1. Create a Project

Step 2. Add Head Fields

Step 3. Add Packets and Packet's Fields

Step 4. Generate Protocol Source code,Demo Source Code and Protocol Struct Diagram

-

Step 1. Create a Project

The first step of using Network Programming Gear  is create a project. When creating your project, you can choose your protocol is TCP-Based or UDP-Based, the target platform is Windows or Unix(Linux), the library type you want to build is dll library or static library. At the same time, the protocol name you are creating must be gaven and must select a saved location.

 

 

 

Step 2. Add Head Fields

 

After you have created a empty project, you can add your protocol fields into the protocol head. Basically, a protocol head should include message "total length" field and message "packet type" field.

When adding your protocol fields, you must enter the field name.

The field "Unit" you can choose is "byte","bit" or "TLV". If you choose is "bit", the field "Max Length" edit box will be enable to let you enter the field's max bits.

The field "Data Type" you can choose is "char []", "char *" or some others integer data type.

 

If you choose is "char []", the "Max Length" edit box will be enable to let you enter the char array's max length; the "Attribute" combox will be enable to let you choose. If the field "Attribute" you choose is "variant length", the "Variant" combox will be enable to let you choose the field variant way. If the field "Variant" you choose is "separated by binary 0", the field length will be figure out by binary 0, if you choose is "select a related field" or "select a related field,additional binary 0 at end", the field "Related Field(Length)" combox will be enable to let you choose a related field in head fields. By this way, the field length will be figure out by this value of the related field in head.

 

If you choose is "char *", that means the field will allocate memory dynamically. The field "Max Length" edit box will be enable to let you enter the max unit length of this field and the field "Max Count" means the numbers of unit. Under this situation, the field max buffer size will be figure out by the value of "Max Length" plus the value of "Max Count". You must choose another field in header for "Related Field(Count)". The real count of units will be figure out by this field when network communicating. The meaning of field "Attribute", "Variant" and "Related Field(Length)" you can reference the introduction when the field "Data Type" you choose is "char []".

 

The field "Type" you can choose is "header length","body length","total length" and "packet type". If you choose is "header length" that means the message head length will be figure out by this field when communicating. If you choose is "body length" that means the message body length will be figure out by this field when communicating. If you choose is "total length" that means the message total length will be figure out by this field when communicating. If you choose is "packet type" that means the message type will be identified by this field.

 

 

NOTICE: You must add your protocol fields by the order that their sequence in your protocol.

 

Step 3. Add Packets and Packet's Fields

You can add many packets and packet's fields as you want.

You must enter the packet's name and value of the packet's type when you adding packet

.

Step 4. Generate Protocol Source Code,Demo Source Code and Protocol Struct Diagram

 

 

 

 

-

 

 

 

 

 

?2006 - 2008 upRedSun Corporation. All Rights Reserved.