def decode_uPER(uPER_encodedBuffer): ''' Decode an uPER buffer and place it in a native Asn1Scc type ''' # Create a stream buffer, put the encoded data inside it, and decode it buffer = ASN1.DataStream(DV.T_Int32_REQUIRED_BYTES_FOR_ENCODING) buffer.SetFromPyString(uPER_encodedBuffer) decoded_value = ASN1.T_Int32() decoded_value.Decode(buffer) return decoded_value
def ProcessTM(self): if self.messageReceivedType == i_out_msg: print "\n"+chr(27)+"[32m" + "Received Telemetry: out_msg" + chr(27) + "[0m\n" backup = self._pMem # Read the data for param y var_y = dataview_uniq_asn.T_Int32() var_y.SetData(self._pMem) print "Parameter y:" var_y.PrintAll() print # self._pMem = DV.MovePtrBySizeOf_T_Int32(self._pMem) # Revert the pointer to start of the data self._pMem = backup
def typeInstance(): # Create an intance of an ASN.1 ctype return ASN1.T_Int32()
def decode_TM(rawTM): ''' Decode a msgQ message (native encoding) ''' tm = ASN1.T_Int32() tm.SetData(rawTM) return tm