2
0
mirror of https://github.com/esiur/esiur-js.git synced 2026-04-03 21:48:21 +00:00
This commit is contained in:
2021-03-10 01:25:20 +03:00
parent ca2b89540a
commit a08519bde8
55 changed files with 4190 additions and 6679 deletions

View File

@@ -391,7 +391,9 @@ export default class IIPPacket
offset += cl;
}
else if (this.action == IIPPacketAction.GetProperty)
else if (this.action == IIPPacketAction.Listen
|| this.action == IIPPacketAction.Unlisten)
//this.action == IIPPacketAction.GetProperty)
{
if (this.notEnough(offset, ends, 5))
return -this.dataLengthNeeded;
@@ -402,20 +404,20 @@ export default class IIPPacket
this.methodIndex = data.getUint8(offset++);
}
else if (this.action == IIPPacketAction.GetPropertyIfModified)
{
if (this.notEnough(offset, ends, 9))
return -this.dataLengthNeeded;
// else if (this.action == IIPPacketAction.GetPropertyIfModified)
// {
// if (this.notEnough(offset, ends, 9))
// return -this.dataLengthNeeded;
this.resourceId = data.getUint32(offset);
offset += 4;
// this.resourceId = data.getUint32(offset);
// offset += 4;
this.methodIndex = data[offset++];
// this.methodIndex = data[offset++];
this.resourceAge = data.getUint64(offset);
offset += 8;
// this.resourceAge = data.getUint64(offset);
// offset += 8;
}
// }
else if (this.action == IIPPacketAction.SetProperty)
{
if (this.notEnough(offset, ends, 6))
@@ -552,9 +554,9 @@ export default class IIPPacket
offset += cl;
}
else if (this.action == IIPPacketAction.InvokeFunctionArrayArguments
|| this.action == IIPPacketAction.InvokeFunctionNamedArguments
|| this.action == IIPPacketAction.GetProperty
|| this.action == IIPPacketAction.GetPropertyIfModified)
|| this.action == IIPPacketAction.InvokeFunctionNamedArguments)
//|| this.action == IIPPacketAction.GetProperty
//|| this.action == IIPPacketAction.GetPropertyIfModified)
{
if (this.notEnough(offset, ends, 1))
@@ -586,7 +588,9 @@ export default class IIPPacket
offset += size;
}
}
else if (this.action == IIPPacketAction.SetProperty)
else if (this.action == IIPPacketAction.SetProperty
|| this.action == IIPPacketAction.Listen
|| this.action == IIPPacketAction.Unlisten)
{
// nothing to do
}

View File

@@ -21,10 +21,10 @@ export default // const IIPPacketAction =
// Request Invoke
InvokeFunctionArrayArguments: 16,
GetProperty: 17,
GetPropertyIfModified: 18,
SetProperty: 19,
InvokeFunctionNamedArguments: 20,
InvokeFunctionNamedArguments: 17,
Listen: 18,
Unlisten: 19,
SetProperty: 20,
// Request Attribute
GetAllAttributes: 24,