|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
Writes OSDP packet captures to .osdpcap file format. More...
Public Member Functions | |
| OSDPCaptureFileWriter (string filePath, string source, bool append=true) | |
| Initializes a new instance of the OSDPCaptureFileWriter class. | |
| void | WritePacket (byte[] data, TraceDirection direction) |
| Writes a packet to the capture file. | |
| void | WritePacket (byte[] data, TraceDirection direction, DateTime timestamp) |
| Writes a packet to the capture file with a specific timestamp. | |
| void | WriteTrace (TraceEntry trace) |
| Writes a trace entry to the capture file. | |
| void | Dispose () |
| Releases all resources used by the OSDPCaptureFileWriter. | |
Protected Member Functions | |
| virtual void | Dispose (bool disposing) |
| Releases resources used by the OSDPCaptureFileWriter. | |
Writes OSDP packet captures to .osdpcap file format.
This format is compatible with OSDP trace analyzers and can be used for debugging and analysis.
Definition at line 11 of file OSDPCaptureFileWriter.cs.
|
inline |
Initializes a new instance of the OSDPCaptureFileWriter class.
| filePath | The path to the output .osdpcap file. |
| source | The source identifier for the capture (e.g., "OSDP.Net", "PassiveMonitor"). |
| append | If true, appends to the existing file; otherwise creates a new file. |
| ArgumentNullException | Thrown when filePath or source is null. |
Definition at line 24 of file OSDPCaptureFileWriter.cs.
Referenced by WritePacket(), WritePacket(), and WriteTrace().
|
inline |
Releases all resources used by the OSDPCaptureFileWriter.
Definition at line 128 of file OSDPCaptureFileWriter.cs.
References Dispose().
Referenced by Dispose().
|
inlineprotectedvirtual |
Releases resources used by the OSDPCaptureFileWriter.
| disposing | True if disposing managed resources. |
Definition at line 138 of file OSDPCaptureFileWriter.cs.
|
inline |
Writes a packet to the capture file.
| data | The raw packet data. |
| direction | The direction of the packet (Input, Output, or Trace). |
| ArgumentNullException | Thrown when data is null. |
| ObjectDisposedException | Thrown when the writer has been disposed. |
Definition at line 59 of file OSDPCaptureFileWriter.cs.
References OSDPCaptureFileWriter().
|
inline |
Writes a packet to the capture file with a specific timestamp.
| data | The raw packet data. |
| direction | The direction of the packet (Input, Output, or Trace). |
| timestamp | The timestamp for the packet (in UTC). |
| ArgumentNullException | Thrown when data is null. |
| ObjectDisposedException | Thrown when the writer has been disposed. |
Definition at line 75 of file OSDPCaptureFileWriter.cs.
References OSDPCaptureFileWriter().
|
inline |
Writes a trace entry to the capture file.
This method is compatible with Action<TraceEntry> callbacks used in the library.
| trace | The trace entry to write. |
| ObjectDisposedException | Thrown when the writer has been disposed. |
Definition at line 89 of file OSDPCaptureFileWriter.cs.
References OSDP.Net.Tracing.TraceEntry.Data, OSDP.Net.Tracing.TraceEntry.Direction, and OSDPCaptureFileWriter().