def __init__(self, binaryString=None, attributesSize2=0, attributeMap2=None): """default constructor: initialise with header size""" BinaryUnit.__init__(self, binaryString, PDU_HEADER_BYTE_SIZE, PDU_HEADER_ATTRIBUTES, attributesSize2, attributeMap2)
def __init__(self, binaryString=None): # default constructor: initialise with CLCW size emptyData = (binaryString == None) if emptyData: binaryString = "\0" * CLCW_BYTE_SIZE BinaryUnit.__init__(self, binaryString, CLCW_BYTE_SIZE, CLCW_ATTRIBUTES)
def __init__(self, binaryString=None, attributesSize1=0, attributeMap1=None, attributesSize2=0, attributeMap2=None): """initialise the date structure with binaryString and attribute maps""" BinaryUnit.__init__(self, binaryString, attributesSize1, attributeMap1, attributesSize2, attributeMap2)
def __init__(self, binaryString=None): # default constructor: initialise with header size emptyData = (binaryString == None) if emptyData: binaryString = "\0" * TC_SEGMENT_HEADER_BYTE_SIZE BinaryUnit.__init__(self, binaryString, TC_SEGMENT_HEADER_BYTE_SIZE, TC_SEGMENT_HEADER_ATTRIBUTES)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * TC_FRAME_HEADER_BYTE_SIZE BinaryUnit.__init__(self, binaryString, TC_FRAME_HEADER_BYTE_SIZE, TC_FRAME_HEADER_ATTRIBUTES) self.clipToFrameLength()
def __init__(self, binaryString=None): """default constructor: initialise with header size""" # note: correct packetSize is not forced! emptyData = (binaryString == None) if emptyData: binaryString = "\0" * TM_FRAME_DU_HEADER_BYTE_SIZE BinaryUnit.__init__(self, binaryString, TM_FRAME_DU_HEADER_BYTE_SIZE, TM_FRAME_DU_ATTRIBUTES)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * PRIMARY_HEADER_BYTE_SIZE BinaryUnit.__init__(self, binaryString, PRIMARY_HEADER_BYTE_SIZE, PRIMARY_HEADER_ATTRIBUTES) if emptyData: self.setPacketLength()
def __init__(self, binaryString=None): """default constructor: initialise with header size""" # note: correct packetSize is not forced! emptyData = (binaryString == None) if emptyData: binaryString = "\0" * PDU_HEADER_BYTE_SIZE BinaryUnit.__init__(self, binaryString, PDU_HEADER_BYTE_SIZE, PDU_HEADER_ATTRIBUTES) if emptyData: self.pduType = PDU_TYPE_NULL self.subType = SUB_TYPE_NULL self.field1 = FIELD1_NULL
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (TC_DU_HEADER_BYTE_SIZE + TC_PACKET_HEADER_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, TC_DU_HEADER_BYTE_SIZE, TC_DU_HEADER_ATTRIBUTES, TC_PACKET_HEADER_ATTRIBUTES) if emptyData: # AD packet / BD segment self.dataUnitType = TC_PACKET_HEADER_DU_TYPE self.packetSize = len(self)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (CCSDS.PACKET.PRIMARY_HEADER_BYTE_SIZE + TC_PACKET_DATAFIELD_HEADER_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, CCSDS.PACKET.PRIMARY_HEADER_BYTE_SIZE, CCSDS.PACKET.PRIMARY_HEADER_ATTRIBUTES, TC_PACKET_DATAFIELD_HEADER_ATTRIBUTES) if emptyData: self.setPacketLength() self.packetType = CCSDS.PACKET.TC_PACKET_TYPE self.dataFieldHeaderFlag = 1
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (TC_DU_HEADER_BYTE_SIZE + TC_LINK_STATUS_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, TC_DU_HEADER_BYTE_SIZE, TC_DU_HEADER_ATTRIBUTES, TC_LINK_STATUS_ATTRIBUTES) if emptyData: # Link status self.dataUnitType = TC_LINK_STATUS_DU_TYPE self.packetSize = len(self)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (TC_DU_HEADER_BYTE_SIZE + TC_CLTU_RESPONSE_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, TC_DU_HEADER_BYTE_SIZE, TC_DU_HEADER_ATTRIBUTES, TC_CLTU_RESPONSE_ATTRIBUTES) if emptyData: # CLTU response self.dataUnitType = TC_CLTU_RESPONSE_DU_TYPE self.packetSize = len(self)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (PDU_HEADER_BYTE_SIZE + TM_SCOE_SEC_HEADER_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, PDU_HEADER_BYTE_SIZE, PDU_HEADER_ATTRIBUTES, TM_SCOE_SEC_HEADER_ATTRIBUTES) if emptyData: self.setDataFieldLength() self.pduType = PDU_TYPE_TM self.subType = SUB_TYPE_SCOE self.field1 = FIELD1_NULL self.structureType = TM_SCOE_STRUCTURE_TYPE
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (PDU_HEADER_BYTE_SIZE + TC_SCOE_SEC_HEADER_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, PDU_HEADER_BYTE_SIZE, PDU_HEADER_ATTRIBUTES, TC_SCOE_SEC_HEADER_ATTRIBUTES) if emptyData: self.setDataFieldLength() self.pduType = PDU_TYPE_TC self.subType = SUB_TYPE_SCOE self.field1 = FIELD1_NULL self.structureType = TC_SCOE_STRUCTURE_TYPE self.telecommandOrigin = TC_ORIGIN_CCS self.telecommandEchoStatus = TC_ECHO_STATUS_OK
def __init__(self, binaryString=None, enableSecondaryHeader=False): # default constructor: initialise with primary header size emptyData = (binaryString == None) if emptyData: if enableSecondaryHeader: binaryString = "\0" * (TM_FRAME_PRIMARY_HEADER_BYTE_SIZE + TM_FRAME_SECONDARY_HEADER_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, TM_FRAME_PRIMARY_HEADER_BYTE_SIZE, TM_FRAME_PRIMARY_HEADER_ATTRIBUTES, TM_FRAME_SECONDARY_HEADER_ATTRIBUTES) self.secondaryHeaderFlag = 1 else: binaryString = "\0" * TM_FRAME_PRIMARY_HEADER_BYTE_SIZE BinaryUnit.__init__(self, binaryString, TM_FRAME_PRIMARY_HEADER_BYTE_SIZE, TM_FRAME_PRIMARY_HEADER_ATTRIBUTES) self.secondaryHeaderFlag = 0 else: BinaryUnit.__init__(self, binaryString, TM_FRAME_PRIMARY_HEADER_BYTE_SIZE, TM_FRAME_PRIMARY_HEADER_ATTRIBUTES) # enable also the attributes of the secondary header # if the corresponding flag is set if self.secondaryHeaderFlag: object.__setattr__(self, "attributeMap2", TM_FRAME_SECONDARY_HEADER_ATTRIBUTES)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" emptyData = (binaryString == None) if emptyData: binaryString = "\0" * (PDU_HEADER_BYTE_SIZE + TC_SPACE_SEC_HEADER_BYTE_SIZE) BinaryUnit.__init__(self, binaryString, PDU_HEADER_BYTE_SIZE, PDU_HEADER_ATTRIBUTES, TC_SPACE_SEC_HEADER_ATTRIBUTES) if emptyData: self.setDataFieldLength() self.pduType = PDU_TYPE_TC self.subType = SUB_TYPE_SPACE self.field1 = FIELD1_NULL self.structureType = TC_SPACE_STRUCTURE_TYPE self.telecommandType = TC_TYPE_PACKET self.telecommandOrigin = TC_ORIGIN_CCS self.telecommandProtMode = TC_PROT_MODE self.ancillaryInformation = TC_ANCILLARY_INFORMATION self.telecommandEchoStatus = TC_ECHO_STATUS_OK self.sequenceFlags = TC_SEQUENCE_FLAGS_UN_SEGMENTED
def __init__(self, binaryString=None): """default constructor""" BinaryUnit.__init__(self, binaryString, TC_SEGMENT_HEADER_BYTE_SIZE, TC_SEGMENT_HEADER_ATTRIBUTES)
def __init__(self, binaryString=None): """default constructor""" BinaryUnit.__init__(self, binaryString, CLCW_BYTE_SIZE, CLCW_ATTRIBUTES)
def __init__(self, binaryString=None): """default constructor: initialise with header size""" BinaryUnit.__init__(self, binaryString, TM_FRAME_DU_HEADER_BYTE_SIZE, TM_FRAME_DU_ATTRIBUTES)