Lines Matching defs:Command
244 default: LOG(WARNING) << "Unknown command code: " << command_code;
1199 class Command(object):
1200 """Represents a TPM command.
1203 name: The command name (e.g. 'TPM2_Startup').
1204 command_code: The name of the command code constant (e.g. TPM2_CC_Startup).
1205 request_args: A list to hold command input arguments. Each element is a dict
1209 'command_code': The optional value of the command code constant.
1211 response_args: A list identical in form to request_args but to hold command
1298 CHECK(serialized_command->size() == command_size) << "Command size mismatch!";
1299 VLOG(2) << "Command: " << base::HexEncode(serialized_command->data(),
1425 std::string command;
1427 &command,
1433 transceiver_->SendCommand(command, parser);
1439 std::string command;
1441 &command,
1446 std::string response = transceiver_->SendCommandAndWait(command);
1455 """Initializes a Command instance.
1460 name: The command name (e.g. 'TPM2_Startup').
1468 """Prints method and callback declaration statements for this command.
1477 """Generates a serialize function for the command inputs.
1497 # Serialize the command code and all the handles and parameters.
1507 # Compute the command hash and construct handle and parameter sections.
1531 """Generates a parse function for the command outputs.
1554 # Setup a serialized command code which is needed for the response hash.
1580 """Generates the implementation of a Tpm class method for this command.
1582 The method assembles a command to be sent unmodified to the TPM and invokes
1583 the CommandTransceiver with the command. Errors are reported directly to the
1603 """Generates the implementation of an error callback for this command.
1605 The error callback simply calls the command response callback with the error
1618 """Generates the implementation of a response callback for this command.
1642 """Returns the number of input handles for this command."""
1646 """Returns the number of output handles for this command."""
1650 """Prints method declaration statements for this command.
1668 """Prints a callback typedef for this command.
1681 """Creates an appropriate generated method name for the command.
1683 We use the command name without the TPM2_ prefix.
1761 # Handle types that always appear as command parameters.
1824 """Command definition parser.
1827 command specification from the Trusted Computing Group. The syntax
1836 # Pull the command code from a comment like: _COMMENT TPM_CC_Startup {NV}.
1867 A list of extracted Command objects.
1884 """Parses inputs and outputs for a single TPM command.
1887 A single Command object.
1891 print('Cannot match command input from line: %s\n' % self._line)
1894 cmd = Command(name)
1899 print('Cannot match command output from line: %s\n' % self._line)
1908 print('Command code not found for %s' % name)
1913 """Parses a set of arguments for a command.
1918 cmd: The current Command object. The command_code attribute will be set if
1922 A list of arguments in the same form as the Command.request_args and
1923 Command.response_args attributes.
1953 commands: A list of Command objects.
1957 for command in commands:
1959 {'command_code': command.command_code,
1960 'handle_count': command.GetNumberOfRequestHandles()})
1963 for command in commands:
1965 {'command_code': command.command_code,
1966 'handle_count': command.GetNumberOfResponseHandles()})
1979 commands: A list of Command objects.
2027 # every TPM 2.0 command.
2029 for command in commands:
2030 command.OutputDeclarations(out_file)
2038 """Generates implementation code for each command.
2044 commands: A list of Command objects.
2059 for command in commands:
2060 command.OutputSerializeFunction(out_file)
2061 command.OutputParseFunction(out_file)
2062 command.OutputErrorCallback(out_file)
2063 command.OutputResponseCallback(out_file)
2064 command.OutputMethodImplementation(out_file)