Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write local file to FileType object #182

Open
2 of 5 tasks
BrunoTrevisani opened this issue Feb 14, 2024 · 3 comments
Open
2 of 5 tasks

Write local file to FileType object #182

BrunoTrevisani opened this issue Feb 14, 2024 · 3 comments
Labels
all Generally available to all customers enhancements Enhancements future Future Release

Comments

@BrunoTrevisani
Copy link

Type of Issue

  • Issue
  • Change
  • Enhancement
  • Question
  • Help wanted

Current Behavior

Hello,

I'm trying to write a local file to a FileType object in my AddressSpace, but it always returns a BadNotImplemented error.

I also tried using the create file method to create the file object with a local file loaded, but without success.

Below is the code I used to create the objects. Does anyone know what it needs to write a local file to a FileType object and/or load a file via the Create File method?

private ServiceResult OnCreateFileMethodCall(ISystemContext _context, MethodState _method, NodeId _objectId, string fileName, bool requestFileOpen, ref NodeId fileNodeId, ref uint fileHandle)
{
    NodeState parent = _method.Parent;

    FileState fileState = new FileState(parent);
    fileState.SymbolicName = fileName;
    fileState.ReferenceTypeId = ReferenceTypes.Organizes;

    fileState.Create(SystemContext,
                     null,
                     new QualifiedName(fileName, NamespaceIndex),
                     new LocalizedText("en", fileName),
                     true);

    fileNodeId = fileState.NodeId;
    fileHandle = fileState.NumericId;

    parent.AddChild(fileState);
    opcServer_.AddNode(fileState);
    AddPredefinedNode(SystemContext, parent);

    return ServiceResult.Good;
}

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

No response

@technosoftware
Copy link
Member

Please check the Supported Profiles for servers at https://github.com/technosoftware-gmbh/opcua-solution-net/blob/master/documentation/UaServer/SupportedProfiles.md

The File Access Server Facet is not yet supported

@BrunoTrevisani
Copy link
Author

Do you intend to implement File Access Server in the future? Do you have any dates?

@technosoftware technosoftware added enhancements Enhancements future Future Release all Generally available to all customers labels Feb 15, 2024
@technosoftware
Copy link
Member

We have to check the effort for this feature but based on your example we are not sure if that is done correct. Seems you add a FileState to a method but FileState itself needs the implementation of several methods like Open, Close, Read which seems not to be done in this example. See also FileType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all Generally available to all customers enhancements Enhancements future Future Release
Projects
Status: Future
Development

No branches or pull requests

2 participants