OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.95k stars 945 forks source link

I don't know the original reason of 'BadNothingTodo' #458

Closed ggokka closed 6 years ago

ggokka commented 6 years ago

Write: Write a VQT, include VQ. Write.Response.ResponseHeader.ServiceResult is Bad: BadNothingToDo (0x800f0000)

ctt_badnothingtodo

AlinMoldovean commented 6 years ago

@ggokka ,

You need to check in the server where the error code is returned. Normally that is because the service request does not contain any operation.

ggokka commented 6 years ago

@AlinMoldovean One of the source is below

    public override ResponseHeader RegisterNodes(
        RequestHeader requestHeader, 
        NodeIdCollection nodesToRegister, 
        out NodeIdCollection registeredNodeIds)
    {
        registeredNodeIds = null;

        OperationContext context = ValidateRequest(requestHeader, RequestType.RegisterNodes);

        try
        {
            if (nodesToRegister == null || nodesToRegister.Count == 0)
            {
                throw new ServiceResultException(StatusCodes.BadNothingToDo);
            }
AlinMoldovean commented 6 years ago

In that case, the client sent a request with an empty list of nodesToRegister. And is normal for the server to reject it.