Example #1
0
 /// <summary>
 /// 
 /// </summary>
 public STPv3Request()
 {
     this.m_mode = STP.ProtocolMode.BINARY;
     this.m_command = STPv3Commands.SELECT_TAG;
     this.m_tag = null;
     this.m_session = 0;
     this.m_address = 0x0000;
     //this.m_rid = { 0xFF, 0xFF, 0xFF, 0xFF };
     this.m_data = null;
     this.m_blocks = 0x0000;
     this.m_afi = 0x00;
     this.m_flags = 0x00000000;
 }
Example #2
0
            /// <summary>
            /// Retrieves the supported commands <see cref="STPv3Command"/> and puts them into an array
            /// </summary>
            /// <returns>Array of supported commands</returns>
            public static STPv3Command[] GetCommands()
            {
                STPv3Command[] commands;
                System.Reflection.FieldInfo[] fieldInfos;

                fieldInfos = typeof(STPv3Commands).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);

                commands = new STPv3Command[fieldInfos.Length];

                for (int ix = 0; ix < fieldInfos.Length; ix++)
                    if (fieldInfos[ix].FieldType == typeof(STPv3Command))
                        commands[ix] = (STPv3Command)fieldInfos[ix].GetValue(null);

                return commands;
            }