mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
ml_dht: archive
This commit is contained in:
parent
da6b917d89
commit
987bf62382
16 changed files with 0 additions and 7 deletions
29
archived/ml_dht/DataParser.cs
Normal file
29
archived/ml_dht/DataParser.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
namespace ml_dht
|
||||
{
|
||||
class DataParser
|
||||
{
|
||||
MemoryMapReader m_mapReader = null;
|
||||
byte[] m_buffer = null;
|
||||
TrackingData m_trackingData;
|
||||
|
||||
public DataParser()
|
||||
{
|
||||
m_buffer = new byte[1024];
|
||||
m_mapReader = new MemoryMapReader();
|
||||
m_mapReader.Open("head/data");
|
||||
}
|
||||
~DataParser()
|
||||
{
|
||||
m_mapReader.Close();
|
||||
m_mapReader = null;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if(m_mapReader.Read(ref m_buffer))
|
||||
m_trackingData = TrackingData.ToObject(m_buffer);
|
||||
}
|
||||
|
||||
public ref TrackingData GetLatestTrackingData() => ref m_trackingData;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue