Class FileObject

Inheritance Relationships

Base Type

Class Documentation

class FileObject : public eipScanner::BaseObject

Implements interface to File Object (0x37).

Public Types

using UPtr = std::unique_ptr<FileObject>

Public Functions

FileObject(cip::CipUint instanceId, const SessionInfoIf::SPtr &si)

Creates an instance and read the files object state.

Parameters
  • instanceId: the ID of the CIP instance

  • si: the EIP session for explicit messaging

Exceptions
  • std::runtime_error:

  • std::system_error:

FileObject(cip::CipUint instanceId, const SessionInfoIf::SPtr &si, const MessageRouter::SPtr &messageRouter)

Note

used for testing

Parameters
  • instanceId:

  • si:

  • messageRouter:

~FileObject()

Default destructor.

fileObject::FileObjectState::UPtr &getState()

Gets the current state of the file.

Return

void beginUpload(SessionInfoIf::SPtr si, fileObject::EndUploadHandler handle)

Initiates uploading the file from the EIP adapter.

Parameters
  • si: the EIP session for explicit messaging

  • handle: a callback that called when the uploading finishes with an error or not

bool handleTransfers(SessionInfoIf::SPtr si)

Handle upload transfers.

Return

true if uploading is in progress

Friends

friend eipScanner::FileObject::fileObject::FileObjectState