static StateValue Cast(ParameterType type, StateValue value)
        {
            switch (type)
            {
            case ParameterType.Signal: return(new StateValue(value.ToDateTime()));

            case ParameterType.Bool: return(new StateValue(value.ToBool()));

            case ParameterType.Integer: return(new StateValue(value.ToInt()));

            case ParameterType.Float: return(new StateValue(value.ToFloat()));

            default: throw new NotImplementedException();
            }
        }
        public GimmickValue(ParameterType type, StateValue value)
        {
            switch (type)
            {
            case ParameterType.Signal:
                TimeStamp = value.ToDateTime();
                return;

            case ParameterType.Bool:
                BoolValue = value.ToBool();
                return;

            case ParameterType.Integer:
                IntegerValue = value.ToInt();
                return;

            case ParameterType.Float:
                FloatValue = value.ToFloat();
                return;

            default:
                throw new NotImplementedException();
            }
        }