-
Notifications
You must be signed in to change notification settings - Fork 68
/
IChannelFrame.cs
executable file
·132 lines (121 loc) · 5.35 KB
/
IChannelFrame.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//******************************************************************************************************
// IChannelFrame.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://www.opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 01/14/2005 - J. Ritchie Carroll
// Generated original version of source code.
// 09/15/2009 - Stephen C. Wills
// Added new header and license agreement.
// 10/5/2012 - Gavin E. Holden
// Added new header and license agreement.
// 12/17/2012 - Starlynn Danyelle Gilliam
// Modified Header.
//
//******************************************************************************************************
using System;
using System.Runtime.Serialization;
using GSF.TimeSeries;
namespace GSF.PhasorProtocols
{
#region [ Enumerations ]
/// <summary>
/// Fundamental frame types enumeration.
/// </summary>
[Serializable]
public enum FundamentalFrameType
{
/// <summary>
/// Configuration frame.
/// </summary>
ConfigurationFrame,
/// <summary>
/// Data frame.
/// </summary>
DataFrame,
/// <summary>
/// Header frame.
/// </summary>
HeaderFrame,
/// <summary>
/// Command frame.
/// </summary>
CommandFrame,
/// <summary>
/// Undetermined frame type.
/// </summary>
Undetermined
}
#endregion
/// <summary>
/// Represents a protocol independent interface representation of any kind of frame of data that contains
/// a collection of <see cref="IChannelCell"/> objects.
/// </summary>
/// <remarks>
/// <para>
/// The phasor protocols library defines a "frame" as a collection of cells (logical units of data).
/// For example, a <see cref="IDataCell"/> would be defined as a PMU within a frame of data, a <see cref="IDataFrame"/>
/// (derived from <see cref="IChannelFrame"/>), that contains multiple PMU's coming from a PDC.
/// </para>
/// <para>
/// This interface inherits <see cref="IFrame"/> so that classes implementing this interface can be cooperatively
/// integrated into measurement concentration (see <see cref="ConcentratorBase"/>).
/// </para>
/// </remarks>
public interface IChannelFrame : IChannel, IFrame, ISerializable
{
// We keep this IChannelFrame as a simple non-generic interface to prevent complex circular type definitions
// that would be caused by a strongly-typed "parent" reference in IChannelCell. The parent reference is
// extremely useful in the actual protocol implementations since many of the properties of a cell and a
// frame may be shared. The strongly-typed generic version of the IChannelFrame interface is below.
/// <summary>
/// Gets the <see cref="FundamentalFrameType"/> for this <see cref="IChannelFrame"/>.
/// </summary>
FundamentalFrameType FrameType { get; }
/// <summary>
/// Gets the simple reference to the collection of cells for this <see cref="IChannelFrame"/>.
/// </summary>
object Cells { get; }
/// <summary>
/// Gets or sets the ID code of this <see cref="IChannelFrame"/>.
/// </summary>
ushort IDCode { get; set; }
/// <summary>
/// Gets UNIX based time representation of the ticks of this <see cref="IChannelFrame"/>.
/// </summary>
UnixTimeTag TimeTag { get; }
}
/// <summary>
/// Represents a strongly-typed protocol independent interface representation of any kind of frame of data that
/// contains a collection of <see cref="IChannelCell"/> objects.
/// </summary>
/// <remarks>
/// This interface inherits <see cref="IFrame"/> so that classes implementing this interface can be cooperatively
/// integrated into measurement concentration (see <see cref="ConcentratorBase"/>).
/// </remarks>
/// <typeparam name="T">Specific <see cref="IChannelCell"/> type that the <see cref="IChannelFrame{T}"/> contains.</typeparam>
public interface IChannelFrame<T> : IChannelFrame where T : IChannelCell
{
/// <summary>
/// Gets the strongly-typed reference to the collection of cells for this <see cref="IChannelFrame{T}"/>.
/// </summary>
new IChannelCellCollection<T> Cells { get; }
/// <summary>
/// Gets or sets the parsing state for this <see cref="IChannelFrame{T}"/>.
/// </summary>
new IChannelFrameParsingState<T> State { get; set; }
}
}