List<Integer> directoriesList = parseObjects(rx_body);
for (int subDirectory : directoriesList)
{
- Log.v(TAG, " STORAGE ID : " + storageId + " DIRECTORY ID : " + subDirectory);
+ Log.v(TAG, " TOP STORAGE ID : " + storageId + " DIRECTORY ID : " + subDirectory);
publisher.enqueueCommand(new PtpIpCommandGeneric(this, GET_STORAGE_HANDLE2, delayMs, isDumpLog, 0, 0x1007, 12, storageId, 0x00000000, subDirectory, 0)); //
}
return;
import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandCallback;
import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandPublisher;
import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpMessages;
-import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.CanonInitEventRequest;
+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.NikonInitEventRequest;
+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific.StatusRequestMessage;
import java.io.BufferedReader;
import java.io.DataOutputStream;
{
Log.v(TAG, " CONNECT FAIL...(EVENT) : " + ipAddress + " " + portNumber);
}
- issueCommand(new CanonInitEventRequest(this, eventConnectionNumber));
-
+ issueCommand(new NikonInitEventRequest(this, eventConnectionNumber));
/*
Thread thread = new Thread(new Runnable()
{
--- /dev/null
+package net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.specific;
+
+import androidx.annotation.NonNull;
+
+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandCallback;
+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.PtpIpCommandBase;
+
+public class NikonInitEventRequest extends PtpIpCommandBase
+{
+ private final IPtpIpCommandCallback callback;
+ private final int connectionNumber;
+
+ public NikonInitEventRequest(@NonNull IPtpIpCommandCallback callback, int connectionNumber)
+ {
+ this.callback = callback;
+ this.connectionNumber = connectionNumber;
+ }
+
+ @Override
+ public IPtpIpCommandCallback responseCallback()
+ {
+ return (callback);
+ }
+
+ @Override
+ public int getId()
+ {
+ return (SEQ_EVENT_INITIALIZE);
+ }
+
+ @Override
+ public int receiveDelayMs()
+ {
+ return (100);
+ }
+
+ @Override
+ public boolean receiveAgainShortLengthMessage()
+ {
+ return (false);
+ }
+
+ @Override
+ public boolean useSequenceNumber()
+ {
+ return (false);
+ }
+
+ @Override
+ public boolean isIncrementSeqNumber()
+ {
+ return (false);
+ }
+
+ @Override
+ public byte[] commandBody()
+ {
+ byte data0 = ((byte) (0x000000ff & connectionNumber));
+ byte data1 = ((byte)((0x0000ff00 & connectionNumber) >> 8));
+ byte data2 = ((byte)((0x00ff0000 & connectionNumber) >> 16));
+ byte data3 = ((byte)((0xff000000 & connectionNumber) >> 24));
+
+ return (new byte[] {
+ // packet type
+ (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00, data0, data1, data2, data3,
+ });
+ }
+
+
+}