コード例 #1
0
ファイル: PmBus.cs プロジェクト: waflores/ChassisManager
        /// <summary>
        /// Get the number of data bytes associated with the command
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        static internal CompletionCode GetNumberOfDataBytesForCommand(PmBusCommand command, out byte numDataBytes)
        {
            numDataBytes = 0;
            TransactionType trType;

            if (commandTable.ContainsKey(command))
            {
                trType       = commandTable[command];
                numDataBytes = GetNumberfOfDataBytesFromTransactionType(trType);
                return(CompletionCode.Success);
            }
            return(CompletionCode.InvalidCommand);
        }
コード例 #2
0
ファイル: PmBus.cs プロジェクト: silupher/ChassisManager
 /// <summary>
 /// Get the number of data bytes associated with the command
 /// </summary>
 /// <param name="command"></param>
 /// <returns></returns>
 internal static CompletionCode GetNumberOfDataBytesForCommand(PmBusCommand command, out byte numDataBytes)
 {
     numDataBytes = 0;
     TransactionType trType;
     if (commandTable.ContainsKey(command))
     {
         trType = commandTable[command];
         numDataBytes = GetNumberfOfDataBytesFromTransactionType(trType);
         return CompletionCode.Success;
     }
     return CompletionCode.InvalidCommand;
 }