import static net.osdn.gokigen.a01d.camera.utils.SimpleLogDumper.dump_bytes;
-public class CanonStatusChecker implements IPtpIpCommandCallback, ICameraStatusWatcher, ICameraStatus
+public class CanonStatusChecker0 implements IPtpIpCommandCallback, ICameraStatusWatcher, ICameraStatus
{
private final String TAG = toString();
private static final int STATUS_MESSAGE_HEADER_SIZE = 14;
private final IPtpIpCommandPublisher issuer;
private ICameraStatusUpdateNotify notifier = null;
- private CanonStatusHolder statusHolder;
+ private final CanonStatusHolder statusHolder;
private boolean whileFetching = false;
- private boolean logcat = false;
+ private final boolean logcat = false;
private final String ipAddress;
private final int portNumber;
private BufferedReader bufferedReader = null;
private int eventConnectionNumber = 0;
- public CanonStatusChecker(@NonNull Activity activity, @NonNull IPtpIpCommandPublisher issuer, @NonNull String ip, int portNumber)
+ public CanonStatusChecker0(@NonNull Activity activity, @NonNull IPtpIpCommandPublisher issuer, @NonNull String ip, int portNumber)
{
this.issuer = issuer;
this.statusHolder = new CanonStatusHolder();
if (data.length < STATUS_MESSAGE_HEADER_SIZE)
{
- Log.v(TAG, "received status length is short. (" + data.length + " bytes.)");
+ Log.v(TAG, " received status event length is short. (" + data.length + " bytes.)");
return;
}
/*
{
try
{
- if (statusHolder == null)
- {
- return (new ArrayList<>());
- }
return (statusHolder.getAvailableItemList(key));
}
catch (Exception e)
{
try
{
- if (statusHolder == null)
- {
- return ("");
- }
return (statusHolder.getItemStatus(key));
}
catch (Exception e)
if (isDumpReceiveLog)
{
// ログに送信メッセージを出力する
- dump_bytes("SEND[" + sendData.length + "] ", sendData);
+ dump_bytes("Evt.SEND[" + sendData.length + "] ", sendData);
}
// (データを)送信
{
// ログに受信メッセージを出力する
Log.v(TAG, " receive_from_camera() : " + read_bytes + " bytes.");
- dump_bytes("RECV[" + receive_body.length + "] ", receive_body);
+ dump_bytes(" Evt.RECV[" + receive_body.length + "] ", receive_body);
}
if (callback != null)
{