コード例 #1
0
	def create ( cls, p_opcode, p_args, p_timeout = 0.0, p_guid = None ):
	#----------------------------------------------------------------------

		l_format = opcodes.command_format(p_opcode)

		if l_format == None:
			return None

		l_data = data.pack(l_format, p_args)

		if l_data == None:
			return None

		l_command = cls(p_opcode, l_data)

		l_command.set_timeout(p_timeout)
		l_command.set_guid(p_guid)

		return l_command
コード例 #2
0
	def get_format ( self ):
	#----------------------------------------------------------------------

		return opcodes.command_format(self.get_opcode())