AIS-B WIP
This commit is contained in:
parent
47539cc72a
commit
5577fd22b5
@ -247,6 +247,14 @@ namespace bsmd.AIS2Service
|
||||
this.LastUpdate = DateTime.Now;
|
||||
}
|
||||
|
||||
internal void Update(AIS_ClassBStatic staticData)
|
||||
{
|
||||
|
||||
|
||||
|
||||
this.LastUpdate = DateTime.Now;
|
||||
}
|
||||
|
||||
internal static AIS_Target CreateFromReader(IDataReader reader)
|
||||
{
|
||||
int mmsi = reader.GetInt32(0);
|
||||
|
||||
@ -77,6 +77,18 @@ namespace bsmd.AIS2Service
|
||||
_dbQueue.Enqueue(_sitRep[staticData.MMSI]);
|
||||
}
|
||||
break;
|
||||
case AISClass.AISType.CLASS_B_STATIC_DATA:
|
||||
{
|
||||
AIS_ClassBStatic bStaticData = aisMessage as AIS_ClassBStatic;
|
||||
if(!_sitRep.ContainsKey(bStaticData.MMSI))
|
||||
{
|
||||
AIS_Target target = new AIS_Target(bStaticData.MMSI);
|
||||
_sitRep[bStaticData.MMSI] = target;
|
||||
}
|
||||
_sitRep[bStaticData.MMSI].Update(bStaticData);
|
||||
_dbQueue.Enqueue(_sitRep[bStaticData.MMSI]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_log.InfoFormat("currently discarding AIS message {0}", aisMessage.MessageType);
|
||||
break;
|
||||
|
||||
@ -10,22 +10,20 @@
|
||||
console.log('error: ' + err);
|
||||
});
|
||||
function updateData(data) {
|
||||
var table = document.getElementById("aisTable");
|
||||
|
||||
const table = document.getElementById('Table');
|
||||
const table = document.getElementById("aisTable");
|
||||
let numItems = 1;
|
||||
|
||||
numItems++;
|
||||
const row = document.createElement('tr');
|
||||
row.innerHTML = `
|
||||
<td>
|
||||
<input type="text" id="itemDescription${numItems}" placeholder="Item" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="itemValue${numItems}" placeholder="Value" />
|
||||
</td>`;
|
||||
// You could also do the same for the cells and inputs
|
||||
table.appendChild(row);
|
||||
numItems++;
|
||||
const row = document.createElement('tr');
|
||||
row.innerHTML = `<td>
|
||||
<input type="text" id="itemDescription${numItems}" placeholder="Item" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="itemValue${numItems}" placeholder="Value" />
|
||||
</td>`;
|
||||
// You could also do the same for the cells and inputs
|
||||
table.appendChild(row);
|
||||
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user