Please enable JavaScript to view this site.

The following transfer specifications are available in BCC/31 protocol:

- download transfer sequence

- upload transfer sequence

- data save sequence

- data load sequence

- data exchange sequence

Download transfer sequence

When you need to download some information from the connected device to local, you can use the download transfer sequence.

First send the request message, with optional request parameters (REQDATA).

On failure, a bccNack is received.

On success, a bccAck is received with following data (ACKDATA):

Offset

Type

Label

Description

0

U32

COUNT

No. of item that will be received (or 0xFFFFFFFF for continue stream termined only by bccEndData message).

Note: the SCH value of this bccAck will be de DCH for all subsequent commands/message for this sequence.

Now, in order to receive item you have to periodically send bccIBlock message until end of data or operation is aborted.  The message has the following data (IBDATA):

Offset

Type

Label

Description

0

U8

TX

No. of consecutive item that can be received (e.g. transmitted from the connected device)

If there are no data, the sequence is closed by a bccNoData message.

As authorized by the bccIBlock total TX count, the connected device will transmit items (data structure defined as ITEMDATA) with bccData and bccEndData message. Notice that tranporting data with bccEndData is not mandatory: it could be used only as end of sequence marker.

Any time the connected device abort the sequence, you will receive a bccAborted message.

Notes:

bccData (or bccEndData) messages will begin with pid = 0 and will be incremented by 1 at each message (255 + 1 will restart from 0 value) or can always send pid = 0 meaning that no sequence check is required.

bccEndData contain last item (with or without data) and after it the sequence is completed.

The sequence can be aborted at any time with sending bccAbort command to the connected device.

Data structure REQDATA, ACKDATA, IBDATA and ITEMDATA are defined in the request message documentation, but always have the minimum structure declared here.

Upload transfer sequence

When you need to upload some information from local to the connected device, you can use the upload transfer sequence.

First send the request message, with following parameters (REQDATA):

Offset

Type

Label

Description

0

U32

COUNT

No. of item that will be transmitted (or 0xFFFFFFFF for continuos stream terminated only by bccEndData message).

On failure, a bccNack is received.

On success, a bccAck is received with optional data (ACKDATA).

Notes:

the SCH value of this bccAck will be de DCH for all subsequent commands/message for this sequence.

Periodically the connected device will send bccIBlock in order to authorize you to send a number of consecutive items: the message has the following data (IBDATA):

Offset

Type

Label

Description

0

U8

TX

No. of consecutive items that can be transmitted (e.g. received from connected device)

If you have no data to send, send a bccNoData and close the sequence.

As authorized by bccIBlock total TX count, send items (data structure defined as ITEMDATA) with bccData and bccEndData message. Notice that transporting data with bccEndData is not mandatory: it could be used only as end of sequence marker.

Any time the connected device abort the sequence, you will receive a bccAborted message.

Notes:

bccData (or bccEndData) messages will begin with pid = 0 and will be incremented by 1 at each message (255 + 1 will restart from 0 value): if pid is always 0, it mean that no sequence verification is required.

bccEndData contain last item (with or without data) and after it the sequence is completed.

The sequence can be aborted at any time by sending a bccAbort command to the connected device.

Data structure REQDATA, ACKDATA, IBDATA and ITEMDATA are defined in the request message documentation, but always have the minimum structure declared here.

Data save sequence

When you need to save a block of binary data from the connected device to local, you can use the data save sequence.

First send the request message, with the request parameters (REQDATA):

Offset

Type

Label

Description

0

U8

BSIZE

Required item size (0=default), excluding leading U32 offset data.

1

U8[15]

 

(riservati)

On failure, a bccNack is received.

On success, a bccAck is received with following data (ACKDATA):

Offset

Type

Label

Description

0

U32

SIZE

Size of data to be saved [bytes]

4

U8[12]

 

(riservati)

Notes:

the SCH value of this bccAck will be de DCH for all subsequent commands/message for this sequence.

Now, in order to receive item you have to periodically send bccIBlock message until end of data or operation is aborted.  The message has the following data:

Offset

Type

Label

Description

0

U8

TX

No. of consecutive item that can be received (e.g. transmitted from the connected device)

15

U8[15]

 

(riservati)

If there are no data, the sequence is closed by a bccNoData message.

As authorized by the bccIBlock total TX count, the connected device will transmit items with bccData and bccEndData message. Notice that transporting data with bccEndData is not mandatory: it could be used only as end of sequence marker. Items have the following structure:

Offset

Type

Label

Description

0

U32

OFFSET

Item data offset

4

B[]

DATA

Item data (max 251 bytes)

Any time the connected device abort the sequence, you will receive a bccAborted message.

After you receive bccEndData (or bccNoData) message you should send a bccCompleted message (if all things are right) to report that the file transfer has been completed: if you need more time before sending this message, please periodically send a bccWait message to inform the connected device about the delay. The bccCompleted data are:

Offset

Type

Label

Description

0

U32

SIZE

Size of saved data[bytes]

4

U32

COUNT

No. of total binary packet received

At any time the device can decide to abort the transfer. In this case you will receive the notification via the bccAborted message.

Notes:

bccData (or bccEndData) messages will begin with pid = 0 and will be incremented by 1 at each message (255 + 1 will restart from 0 value) or can always send pid = 0 meaning that no sequence check is required.

bccEndData contain last item (with or without data) and after it the sequence is completed.

The sequence can be aborted at any time by sending a bccAbort command to the connected device.

Any time the connected device abort the sequence, you will receive a bccAborted message.

Data structure REQDATA and ACKDATA are defined in the request message documentation, but always have the minimum structure declared here.

Some BCC/31 implementation have limit on the total delay time for bccWait messages: when the limit is reached, the operation will expire.

Data load sequence

When you need to load a block of binary data from local to the connected device, you can use the data load sequence.

First send the request message, with at least the following data (REQDATA):

Offset

Type

Label

Description

0

U32

SIZE

Size of data to be loaded [bytes]

4

U8[12]

-

(reserved)

On failure, a bccNack is received.

On success, a bccAck is received with at least the following data (ACKDATA):

Offset

Type

Label

Description

0

U8

BSIZE

Required item size (0=default), excluding leading U32 offset data.

1

U8[15]

-

(reserved)

Note: the SCH value of this bccAck will be de DCH for all subsequent commands/message for this sequence.

Periodically the connected device will send bccIBlock in order to authorize you to send a number of consecutive items: the message has the following data:

Offset

Type

Label

Description

0

U8

TX

No. of consecutive item that can be transmitted (e.g. received from the connected device)

If you have no data to send, send a bccNoData and close the sequence.

As authorized by bccIBlock total TX count, send items with bccData and bccEndData message. Notice that transporting data with bccEndData is not mandatory: it could be used only as end of sequence marker. Items have the following structure:

Offset

Type

Label

Description

0

U32

OFFSET

Item data offset

4

B[]

DATA

Item data (max 251 bytes)

After you send the bccEndData (or bccNoData) message you should wait the bccCompleted message that report what the device has received all data, with the following format:

Offset

Type

Label

Description

0

U32

SIZE

Total size of loaded data [bytes]

4

U32

COUNT

No. of total binary packet received

Notes:

if this message is not received in an amount of time, you can consider the transfer aborted (not confirmed). If the remote device need more time in order to complete the operation, it can periodically send the bccWait message, until the operation completes.

bccData (or bccEndData) messages will begin with pid = 0 and will be incremented by 1 at each message (255 + 1 will restart from 0 value): if pid is always 0, it mean that no sequence verification is required.

bccEndData contain last item (with or without data) and after it the sequence is completed.

The sequence can be aborted at any time by sending a bccAbort command to the connected device, if you are not already in abort condition).

Any time the connected device abort the sequence, you will receive a bccAborted message.

Data structure REQDATA and ACKDATA are defined in the request message documentation, but always have the minimum structure declared here.

Some BCC/31 implementation have limit on the total delay time for bccWait messages: when the limit is reached, the operation will expire.

Data exchange sequence

The data exchange sequence combine in a single operation the following activities:

loading a block of data (QUERYDATA)

waiting a block of data ready (ANSWERDATA)

saving a block of data (ANSWERDATA)

It is a sort of combination of a data load sequence followed by a data save sequence, but in the same operation context.

Loading a block of data

This phase will send the data block (QUERYDATA) to the device.

First send the request message, with at least the following data (REQDATA):

Offset

Type

Label

Description

0

U32

SIZE

Size of data to be loaded [bytes]

4

U8

BSIZE

Required item size (0=default), excluding leading U32 offset data, that will be used in phase 3.

5

U8[11]

-

(reserved)

On failure, a bccNack is received.

On success, a bccAck is received with at least the following data (ACKDATA):

Offset

Type

Label

Description

0

U8

BSIZE

Required item size (0=default), excluding leading U32 offset data.

1

U8[15]

-

(reserved)

Note: the SCH value of this bccAck will be de DCH for all subsequent commands/message for this sequence, for all phases.

Periodically the connected device will send bccIBlock in order to authorize you to send a number of consecutive items: the message has the following data:

Offset

Type

Label

Description

0

U8

TX

No. of consecutive item that can be transmitted (e.g. received from the connected device)

If you have no data to send, send a bccNoData and close the sequence.

As authorized by bccIBlock total TX count, send items with bccData and bccEndData message. Notice that transporting data with bccEndData is not mandatory: it could be used only as end of sequence marker. Items have the following structure:

Offset

Type

Label

Description

0

U32

OFFSET

Item data offset

4

B[]

DATA

Item data (max 251 bytes)

After you send the bccEndData (or bccNoData) message you should wait the bccCompleted message that report what the device has received all data, with the following format:

Offset

Type

Label

Description

0

U32

SIZE

Total size of loaded data [bytes]

4

U32

COUNT

No. of total binary packet received

If the bccCompleted message is not received in an amount of time, you can consider the transfer aborted (not confirmed).

If the remote device need more time in order to complete the operation, it can periodically send the bccWait message as needed..

When the bccCompleted is received, the operation will go to phase 2.

Notes:

bccData (or bccEndData) messages will begin with pid = 0 and will be incremented by 1 at each message (255 + 1 will restart from 0 value).

bccEndData contain last item (with or without data) and after it the sequence is completed.

The sequence can be aborted at any time by sending a bccAbort command to the connected device, if you are not already in abort condition).

Any time the connected device abort the sequence, you will receive a bccAborted message.

Data structure REQDATA and ACKDATA are defined in the request message documentation, but always have the minimum structure declared here.

Data structure QUERYDATA is fully defined in the request message documentation.

Some BCC/31 implementation have limit on the total delay time for bccWait messages: when the limit is reached, the operation will expire.

Waiting a block of data

This phase will wait that the data block (ANSWERDATA) is ready from the device.

For an amount of time the sequence will wait for the bccReady message, with the following data (READYDATA):

Offset

Type

Label

Description

0

U32

SIZE

Size of data to be saved [bytes]

4

U8[12]

 

(riservati)

When the bccReady is received, the operation will go to phase 3.

If the remote device need more time in order to prepare the answer data it can periodically send the bccWait message as needed.

Notes:

bccReady will have pid = 0.

The sequence can be aborted at any time by sending a bccAbort command to the connected device, if you are not already in abort condition.

Any time the connected device abort the sequence, you will receive a bccAborted message.

Some BCC/31 implementation have limit on the total delay time for bccWait messages: when the limit is reached, the operation will expire.

Data structure READYDATA is defined in the request message documentation, but always have the minimum structure declared here.

Data structure ANSWERDATA is fully defined in the request message documentation.

Saving a block of data

This phase will receive the data block (ANSWERDATA) from the device.

In order to receive data you have to periodically send bccIBlock message until end of data or operation is aborted.  The message has the following data:

Offset

Type

Label

Description

0

U8

TX

No. of consecutive item that can be received (e.g. transmitted from the connected device)

15

U8[15]

 

(riservati)

If there are no data, the sequence is closed by a bccNoData message.

As authorized by the bccIBlock total TX count, the connected device will transmit items with bccData and bccEndData message. Notice that transporting data with bccEndData is not mandatory: it could be used only as end of sequence marker. Items have the following structure:

Offset

Type

Label

Description

0

U32

OFFSET

Item data offset

4

B[]

DATA

Item data (max 251 bytes)

Any time the connected device abort the sequence, you will receive a bccAborted message.

After you receive bccEndData (or bccNoData) message you should send a bccCompleted message (if all things are right) to report that the file transfer has been completed: if you need more time before sending this message, please periodically send a bccWait message to inform the connected device about the delay. The bccCompleted data are:

Offset

Type

Label

Description

0

U32

SIZE

Size of saved data[bytes]

4

U32

COUNT

No. of total binary packet received

When the bccCompleted is sent, the operation is completed.

At any time the device can decide to abort the transfer. In this case you will receive the notification via the bccAborted message.

Notes:

bccData (or bccEndData) messages will begin with pid = 0 and will be incremented by 1 at each message (255 + 1 will restart from 0 value).

bccEndData contain last item (with or without data) and after it the sequence is completed.

The sequence can be aborted at any time by sending a bccAbort command to the connected device.

Any time the connected device abort the sequence, you will receive a bccAborted message.

Some BCC/31 implementation have limit on the total delay time for bccWait messages: when the limit is reached, the operation will expire.

Data structure ANSWERDATA is fully defined in the request message documentation.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC