Skip to content

Commit ce93ae4

Browse files
committed
Camera.ImageArray - Add further logging.
1 parent 8adf9b9 commit ce93ae4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Remote Server/ServerForm.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6436,12 +6436,16 @@ private static void ReturnImageArray(RequestData requestData)
64366436
{
64376437
Array deviceResponse;
64386438
dynamic responseClass = new IntArray2DResponse(requestData.ClientTransactionID, requestData.ServerTransactionID); // Initialise here so that there is a class ready to convey back an error message
6439+
LogMessage(0, 0, 0, "ReturnImageArray", $"Created IntArray2DResponse");
64396440
Exception exReturn = null;
64406441
long lastTime = 0;
64416442

64426443
// Release memory used by the previous image before acquiring the next
6444+
LogMessage(0, 0, 0, "ReturnImageArray", $"Before setting LastImageArray to null");
64436445
ActiveObjects[requestData.DeviceKey].LastImageArray = null;
6446+
LogMessage(0, 0, 0, "ReturnImageArray", $"Set LastImageArray to null OK");
64446447
GC.Collect();
6448+
LogMessage(0, 0, 0, "ReturnImageArray", $"Collected garbage OK");
64456449

64466450
// These flags indicate whether the client supports optimised, faster transfer modes for camera image data
64476451
SharedConstants.ImageArrayCompression compressionType = SharedConstants.ImageArrayCompression.None; // Flag to indicate what type of compression the client supports - initialised to indicate a default of no compression
@@ -6452,6 +6456,7 @@ private static void ReturnImageArray(RequestData requestData)
64526456

64536457
// Determine whether the client supports compressed responses by testing the Accept-Encoding header, if present. GZip compression will be favoured over Deflate if the client accepts both methods
64546458
string[] acceptEncoding = requestData.Request.Headers.GetValues("Accept-Encoding"); // Get the Accept-Encoding header, if present
6459+
LogMessage(0, 0, 0, "ReturnImageArray", $"Got accept coding OK");
64556460
if (acceptEncoding != null) // There is an Accept-Encoding header so check whether it has the compression modes that we support
64566461
{
64576462
if (acceptEncoding[0].Contains("deflate", StringComparison.InvariantCultureIgnoreCase)) compressionType = SharedConstants.ImageArrayCompression.Deflate; // Test

0 commit comments

Comments
 (0)