コード例 #1
0
        public override void execute(Tag tag, String devCode, CellTag cellTag,
                                     SystemDateTag systemDateTag, CasicSession session)
        {
            SystemTimeTag sysTag = tag as SystemTimeTag;

            session.Logger.Info("系统时间TAG:oid:" + sysTag.Oid +
                                "系统时间:" + sysTag.SysTime);
        }
コード例 #2
0
        public static Tag create(String oid, int len, String value)
        {
            Tag tag;

            if (UploadTag.isUploadTag(oid))
            {
                tag = new UploadTag(oid, len, value);
            }
            else if (oid == SystemDateTag.SYSTEM_DATE_OID)
            {
                tag = new SystemDateTag(oid, len, value);
            }
            else if (oid == SystemTimeTag.SYSTEM_TIME_OID)
            {
                tag = new SystemTimeTag(oid, len, value);
            }
            else if (oid == WakeUpTag.WAKEUP_TAG_OID)
            {
                tag = new WakeUpTag(oid, len, value);
            }
            else if (oid == CellTag.CELL_TAG_OID)
            {
                tag = new CellTag(oid, len, value);
            }
            else if (oid == SensorException0Tag.SENSOR_EXCEP0_TAG_OID)
            {
                tag = new SensorException0Tag(oid, len, value);
            }
            else if (oid == SensorException1Tag.SENSOR_EXCEP1_TAG_OID)
            {
                tag = new SensorException1Tag(oid, len, value);
            }
            else
            {
                tag = new NormalTag(oid, len, value);
            }
            return(tag);
        }