Skip to content

Commit

Permalink
Merge branch 'policy3' of https://github.com/admin-shell-io/aasx-server
Browse files Browse the repository at this point in the history
… into policy3
  • Loading branch information
juileetikekar committed Oct 9, 2023
2 parents bc46270 + 614f195 commit 4fe2025
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/AasxServerStandardBib/TimeSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ public static bool timeSeriesSampling(bool final)
value: new List<ISubmodelElement>());
nextCollection.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference,
new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_TimeSeriesSegment.Value) });
nextCollection.TimeStamp = timeStamp;
nextCollection.SetTimeStamp(timeStamp);

/*
var smcvar = AddToSMC<SubmodelElementCollection>(
Expand All @@ -1015,7 +1015,7 @@ public static bool timeSeriesSampling(bool final)
value: new List<ISubmodelElement>());
smcvar.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference,
new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_TimeSeriesVariable.Value) });
smcvar.TimeStamp = timeStamp;
smcvar.SetTimeStamp(timeStamp);
nextCollection.Value.Add(smcvar);

/*
Expand All @@ -1026,7 +1026,7 @@ public static bool timeSeriesSampling(bool final)
var newSme1 = new Property(DataTypeDefXsd.String, idShort: "RecordId");
newSme1.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference,
new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_RecordId.Value) });
newSme1.TimeStamp = timeStamp;
newSme1.SetTimeStamp(timeStamp);
(newSme1 as Property).Value = "timeStamp";
smcvar.Value.Add(newSme1);

Expand All @@ -1036,7 +1036,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme2 = new Property(DataTypeDefXsd.String, idShort: "UtcTime");
newSme2.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_UtcTime.Value) });
newSme2.TimeStamp = timeStamp;
newSme2.SetTimeStamp(timeStamp);
smcvar.Value.Add(newSme2);

/*
Expand All @@ -1046,7 +1046,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme3 = new Blob("BLOB", idShort: "timeStamp");
newSme3.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_ValueArray.Value) });
newSme3.TimeStamp = timeStamp;
newSme3.SetTimeStamp(timeStamp);
(newSme3 as Blob).Value = Encoding.ASCII.GetBytes(tsb.samplesTimeStamp);
smcvar.Value.Add(newSme3);
}
Expand Down Expand Up @@ -1080,7 +1080,7 @@ public static bool timeSeriesSampling(bool final)
var smcvar = new SubmodelElementCollection(idShort: "TSvariable_" + tsb.samplesProperties[i].IdShort,
value: new List<ISubmodelElement>());
smcvar.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_TimeSeriesVariable.Value) });
smcvar.TimeStamp = timeStamp;
smcvar.SetTimeStamp(timeStamp);
nextCollection.Value.Add(smcvar);

/*
Expand All @@ -1090,7 +1090,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme = new Property(DataTypeDefXsd.String, idShort: "RecordId");
newSme.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_RecordId.Value) });
newSme.TimeStamp = timeStamp;
newSme.SetTimeStamp(timeStamp);
(newSme as Property).Value = "" + tsb.samplesProperties[i].IdShort;
smcvar.Value.Add(newSme);

Expand All @@ -1103,7 +1103,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme2 = new Property(DataTypeDefXsd.String, idShort: "" + tsb.samplesProperties[i].IdShort);
newSme2.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_GeneratedFloat.Value) });
newSme2.TimeStamp = timeStamp;
newSme2.SetTimeStamp(timeStamp);
smcvar.Value.Add(newSme2);
}
else
Expand All @@ -1115,7 +1115,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme2 = new Property(DataTypeDefXsd.String, idShort: "" + tsb.samplesProperties[i].IdShort);
newSme2.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_GeneratedInteger.Value) });
newSme2.TimeStamp = timeStamp;
newSme2.SetTimeStamp(timeStamp);
smcvar.Value.Add(newSme2);
}

Expand All @@ -1126,7 +1126,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme3 = new Blob("BLOB", idShort: "ValueArray");
newSme3.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_ValueArray.Value) });
newSme3.TimeStamp = timeStamp;
newSme3.SetTimeStamp(timeStamp);
(newSme3 as Blob).Value = Encoding.ASCII.GetBytes(tsb.samplesValues[i]);
smcvar.Value.Add(newSme3);
}
Expand Down Expand Up @@ -1184,7 +1184,7 @@ public static bool timeSeriesSampling(bool final)
nextCollection = new SubmodelElementCollection(idShort: "Segment_" + tsb.highDataIndex.Value,
value: new List<ISubmodelElement>());
nextCollection.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_TimeSeriesSegment.Value) });
nextCollection.TimeStamp = timeStamp;
nextCollection.SetTimeStamp(timeStamp);

/*
var smcvar = AddToSMC<SubmodelElementCollection>(
Expand All @@ -1194,7 +1194,7 @@ public static bool timeSeriesSampling(bool final)
var smcvar = new SubmodelElementCollection(idShort: "TSvariable_timeStamp",
value: new List<ISubmodelElement>());
smcvar.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_TimeSeriesVariable.Value) });
smcvar.TimeStamp = timeStamp;
smcvar.SetTimeStamp(timeStamp);
nextCollection.Value.Add(smcvar);

/*
Expand All @@ -1204,7 +1204,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme = new Property(DataTypeDefXsd.String, idShort: "RecordId");
newSme.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_RecordId.Value) });
newSme.TimeStamp = timeStamp;
newSme.SetTimeStamp(timeStamp);
(newSme as Property).Value = "timeStamp";
smcvar.Value.Add(newSme);

Expand All @@ -1214,7 +1214,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme2 = new Property(DataTypeDefXsd.String, idShort: "UtcTime");
newSme2.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_UtcTime.Value) });
newSme2.TimeStamp = timeStamp;
newSme2.SetTimeStamp(timeStamp);
smcvar.Value.Add(newSme2);

/*
Expand All @@ -1224,7 +1224,7 @@ public static bool timeSeriesSampling(bool final)
*/
var newSme3 = new Blob("BLOB", idShort: "timeStamp");
newSme3.SemanticId = new Reference(AasCore.Aas3_0.ReferenceTypes.ExternalReference, new List<IKey>() { new Key(KeyTypes.GlobalReference, PrefTimeSeries10.CD_ValueArray.Value) });
newSme3.TimeStamp = timeStamp;
newSme3.SetTimeStamp(timeStamp);
(newSme3 as Blob).Value = Encoding.ASCII.GetBytes(tsb.samplesTimeStamp);
smcvar.Value.Add(newSme3);
}
Expand Down

0 comments on commit 4fe2025

Please sign in to comment.