Exemple #1
0
        private void CreateProtocolCollection()
        {
            NativeMethods.Profile profile = CapiPInvoke.GetProfile(_id);
            // B1 protocols;
            List <Protocol> protocolList = GetProtocols(profile.B1_Protocols, typeof(NativeMethods.B1Protocol), ProtocolStrings.ResourceManager, "B1_");

            _protocols = new ProtocolCollection(protocolList);
        }
Exemple #2
0
        public static NativeMethods.Profile GetProfile(uint controller)
        {
            NativeMethods.Profile profile = new NativeMethods.Profile();
            int code = NativeMethods.CAPI_GET_PROFILE(ref profile, controller);

            ValidateCode(code);
            return(profile);
        }
        private ControllerCollection CreateControllerCollection()
        {
            NativeMethods.Profile profile        = CapiPInvoke.GetProfile(0);
            List <Controller>     controllerList = new List <Controller>();

            for (UInt16 i = 1; i <= profile.number; i++)
            {
                controllerList.Add(new Controller(this, i));
            }
            return(new ControllerCollection(controllerList));
        }