예제 #1
0
        public dynamic GetValue(Item61850 item)
        {
            dynamic val;

            switch (item.typeMMS)
            {
            case MmsType.MMS_BIT_STRING:
                val = _connection.ReadBitStringValue(item.path, item.typeFC);
                break;

            case MmsType.MMS_BOOLEAN:
                val = _connection.ReadBooleanValue(item.path, item.typeFC);
                break;

            case MmsType.MMS_FLOAT:
                val = _connection.ReadFloatValue(item.path, item.typeFC);
                break;

            case MmsType.MMS_INTEGER:
                val = _connection.ReadIntegerValue(item.path, item.typeFC);
                break;

            case MmsType.MMS_UNSIGNED:
                val = _connection.ReadValue(item.path, item.typeFC);
                break;

            case MmsType.MMS_STRING:
                val = _connection.ReadStringValue(item.path, item.typeFC);
                break;

            case MmsType.MMS_UTC_TIME:
                val = _connection.ReadTimestampValue(item.path, item.typeFC);
                break;

            default:
                val = _connection.ReadValue(item.path, item.typeFC);
                break;
            }

            return(val);
        }