public static RawlerBase DataWrite(this RawlerBase rawler, string attribute, DataAttributeType attributeType) { return(rawler.Add(new DataWrite() { Attribute = attribute, AttributeType = attributeType })); }
/// <summary> /// データを書き込む /// </summary> /// <param name="attribute"></param> /// <param name="value"></param> /// <param name="type"></param> /// <param name="attributeType"></param> public void DataWrite(string attribute, string value, DataWriteType type, DataAttributeType attributeType) { if (type == DataWriteType.add) { currentDataRow.AddData(attribute, value, attributeType); } else if (type == DataWriteType.replace) { currentDataRow.ReplaceData(attribute, value, attributeType); } }
/// <summary> /// データを加える。上書きせずリストに蓄積される。 /// </summary> /// <param name="attribute">属性(Key)</param> /// <param name="value">値</param> public void ReplaceData(string attribute, string value, DataAttributeType type) { List <string> list; dataTypeDic.GetValueOrAdd(attribute, type); if (dataDic.TryGetValue(attribute, out list) == false) { list = new List <string>(); dataDic.Add(attribute, list); } list.Clear(); list.Add(value); }
/// <summary> /// 現在のDataRowに書く。DataWriteがよびだすもの。 /// </summary> /// <param name="attribute"></param> /// <param name="value"></param> public void DataWrite(string attribute, string value, DataWriteType type, DataAttributeType attributeType) { if (type == DataWriteType.add) { currentDataRow.AddData(attribute, value, attributeType); } else if (type == DataWriteType.replace) { currentDataRow.ReplaceData(attribute, value, attributeType); } if (attribute.ToLower() == "key") { dataDic.Add(value, currentDataRow); } }
public DataAttribute(string name, ModelNode parent, DataAttributeType type, FunctionalConstraint fc, TriggerOptions trgOps, int arrayElements, UInt32 sAddr) { self = DataAttribute_create(name, parent.self, (int)type, (int)fc, (byte)trgOps, arrayElements, sAddr); }
/// <summary> /// DataWriteの共通呼び出し /// </summary> /// <param name="rawler"></param> /// <param name="attribute"></param> /// <param name="value"></param> /// <param name="type"></param> /// <param name="attributeType"></param> public static void DataWrite(RawlerBase rawler, string attribute, string value, DataWriteType type, DataAttributeType attributeType) { var d = (IData)rawler.GetUpperInterface <IData>(); if (d != null) { d.DataWrite(attribute, value, type, attributeType); } else { ReportManage.ErrUpperNotFound <IData>(rawler); } }
/// <summary> /// データを加える。上書きせずリストに蓄積される。 /// </summary> /// <param name="attribute">属性(Key)</param> /// <param name="value">値</param> public void ReplaceData(string attribute, string value,DataAttributeType type) { List<string> list; dataTypeDic.GetValueOrAdd(attribute, type); if (dataDic.TryGetValue(attribute, out list) == false) { list = new List<string>(); dataDic.Add(attribute, list); } list.Clear(); list.Add(value); }
/** * \brief create a new data attribute and add it to a parent model node * * The parent model node has to be of type LogicalNode or DataObject * * \param name the name of the data attribute (e.g. "stVal") * \param parent the parent model node * \param type the type of the data attribute (CONSTRUCTED if the type contains sub data attributes) * \param fc the functional constraint (FC) of the data attribte * \param triggerOptions the trigger options (dupd, dchg, qchg) that cause an event notification * \param arrayElements the number of array elements if the data attribute is an array or 0 * \param sAddr an optional short address * * \return the newly create DataAttribute instance */ public DataAttribute(string name, ModelNode parentNode, DataAttributeType type, FunctionalConstraint fc, byte triggerOptions, int arrayElements, uint sAddr) { self = DataAttribute_create(name, parentNode.GetLibraryObject(), (int)type, (int)fc, triggerOptions, arrayElements, sAddr); daType = type; daFc = fc; }
public static RawlerBase DataWrite(this RawlerBase rawler, string attribute,DataAttributeType attributeType) { return rawler.Add(new DataWrite() { Attribute = attribute,AttributeType = attributeType }); }