File transfer commands

These are the commands to manage storage locking and file uploads and downloads

Locking

class pyatem.command.LockCommand(store, state)

Implementation of the LOCK command. This requests a new lock, used for data transfers.

Offset

Size

Type

Description

0

1

u16

Store index

2

1

bool

Lock state

3

1

?

unknown

__init__(store, state)
Parameters
  • store – Store number to get the lock for

  • state – True to request the lock, False to release it

class pyatem.command.PartialLockCommand(store, slot)

Implementation of the PLCK command. This requests a new lock, used for data transfers.

Offset

Size

Type

Description

0

1

u16

Store index

2

2

u16

Slot

4

4

?

unknown

__init__(store, slot)
Parameters
  • store – Store number to request a lock for

  • slot – Slot number inside the store to get the partial lock for

Transfer

class pyatem.command.TransferDownloadRequestCommand(transfer, store, slot)

Implementation of the FTSU command. This requests download from the switcher to the client.

Offset

Size

Type

Description

0

2

u16

Tranfer id

2

2

u16

Store

4

2

u16

Slot

8

4

u32

unknown

__init__(transfer, store, slot)
Parameters
  • transfer – Unique transfer number

  • store – Store index

  • slot – Slot index

class pyatem.command.TransferUploadRequestCommand(transfer, store, slot, length, mode)

Implementation of the FTSD command. This requests an upload from the client to the switcher.

Offset

Size

Type

Description

0

2

u16

Tranfer id

2

2

u16

Store

4

2

?

unknown

6

2

u16

Slot

8

2

u32

Data length

12

2

u16

Mode bitfield

14

2

?

unknown

bit

Mode

0

Unknown

1

Write RLE

2

Clear

256

Write uncompressed

512

Pre-erase

__init__(transfer, store, slot, length, mode)
Parameters
  • transfer – Unique transfer number

  • store – Store index

  • slot – Slot index

class pyatem.command.TransferDataCommand(transfer, data)

Implementation of the FTDa command. This is a chunk of data being sent from the client to the hardware.

Offset

Size

Type

Description

0

2

u16

Tranfer id

2

2

u16

Size

4

?

u8[]

Chunk of data

__init__(transfer, data)
Parameters
  • transfer – Unique transfer number

  • data – Chunk of data to send

class pyatem.command.TransferAckCommand(transfer, slot)

Implementation of the FTUA command. This is an acknowledgement for FTDa packets.

Offset

Size

Type

Description

0

2

u16

Tranfer id

2

2

u16

Slot

__init__(transfer, slot)
Parameters
  • transfer – Unique transfer number

  • slot – Slot index

class pyatem.command.TransferFileDataCommand(transfer, hash, name=None, description=None)

Implementation of the FTFD command. This is the file metadata for the uploaded file and should be sent to the hardware after all the FTDa commands have been sent. It contains the name and MD5 hash of the uploaded data.

Offset

Size

Type

Description

0

2

u16

Tranfer id

2

64

str

Name

66

128

str

Description

194

16

u8[]

MD5 hash

210

2

?

unknown

__init__(transfer, hash, name=None, description=None)
Parameters
  • transfer – Unique transfer number

  • name – Filename

  • description – File description

  • hash – Data MD5 hash