4.0 KiB
4.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-17T15:40:14.448178+00:00 | zai-org/GLM-5-FP8 | 1 | 59bc9d04c12dd004 |
Documentation: DTS.Slice.Service Attribute Classes
1. Purpose
This module provides an attribute hierarchy for the SLICE Service within the DataPRO system. The Attribute class serves as a base class for typed attributes associated with different stores (Arm, Event, System, User), with serialization support for dictionary-to-byte-array conversions. SystemAttribute and EventAttribute are derived classes intended to represent system-level and event-level attributes respectively. Note: The majority of the implementation in SystemAttribute and EventAttribute is currently commented out, leaving these classes as essentially empty shells.
2. Public Interface
Attribute (Base Class)
Constructor:
protected Attribute()— Parameterless constructor is protected, preventing direct instantiation.
Constants:
public const int MaxSingleAttributeSize = 500— Maximum size for a single attribute.public const int BulkAttributeStartNumber = 3000— Starting number for bulk attributes.
Protected Properties:
protected AttributeInterface Store { get; set; }— The attribute store type (Arm, Event, System, User).protected AttributeTypes.AttributeDataTypes datatype— The data type of the attribute.protected ushort key— The attribute key.protected object value— The attribute value.
Protected Methods:
protected Dictionary<byte, double> ByteArrayToDict(byte[] bytes)— Deserializes a byte array into aDictionary<byte, double>. Each pair consists of 1 byte key + 8 bytes double value (9 bytes total per pair).protected byte[] DictToByteArray(Dictionary<byte, double> dict)— Serializes aDictionary<byte, double>into a byte array using the same 9-byte-per-pair format.
Protected Enum:
AttributeInterface— Values:Arm,Event,System,User
SystemAttribute (Derived Class)
- Inherits from
Attribute - No active members. The class body contains only commented-out code referencing a
TypeValuesenum and derived attribute classes (SerialNumberAttribute,TotalEventsStoredAttribute).
EventAttribute (Derived Class)
- Inherits from
Attribute - No active members. The class body contains only commented-out code referencing a
TypeValuesenum and numerous derived attribute classes (EventNumber,EventName,EventSampleRate,EventDescription,EventTotalSamples,EventTriggerSampleNumber,EventStartRecordSampleNumber,EventTotalChannels,EventFilterFrequency,EventStartTime,EventExcitation,PreEventScaleFactors,PostEventScaleFactors,EventConfigAttributes).
3. Invariants
- The
Attributeconstructor is protected; only derived classes can instantiate. - Dictionary serialization format: Each key-value pair occupies exactly 9 bytes (1 byte for key + 8 bytes for double).
ByteArrayToDictassumes the input byte array length is evenly divisible by the pair size (9 bytes); behavior is undefined otherwise.- The
Storeproperty must be one of the fourAttributeInterfacevalues.
4. Dependencies
This module depends on:
System(mscorlib)System.Collections.Generic(mscorlib)System.Text(mscorlib)DTS.Common.Utils— Imported inAttribute.csbut no types from this namespace are actively used in the visible code.DTS.DASLib.Command.SLICE— ProvidesByteConvertorclass (referenced in commented code) andAttributeTypes.AttributeDataTypes(referenced in active code).
What depends on this module:
- Cannot be determined from the provided source files alone.
Referenced but not defined in these files:
AttributeTypes.AttributeDataTypes— Used for thedatatypefield; location unclear (possibly in `DTS.DASLib.Command