-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Hi, I noticed that the SetProperty function fails silently when provided with an incorrect value type. For instance, attempting to set a property of type U32 using a value of type I32 does not produce an error, even though the operation is unsuccessful.
I setup my c# client using the instructions under: https://github.com/ni/grpc-device/wiki/Creating-a-gRPC-Client
I run the latest device server on cRIO. Seen issue using XNET
//set termination
var set_cantermination_reply = client.SetProperty(new SetPropertyRequest
{
Session = session,
PropertyId = Property.SessionIntfCanTerm,
I32Scalar = 1 //SET PROPERTY USING WRONG TYPE
});
if (set_cantermination_reply.Status == 1)
{
Console.WriteLine("Setting CAN Termination failed");
}
//read back termination
var get_cantermination_reply = client.GetProperty(new GetPropertyRequest
{
Session = session,
PropertyId = NationalInstruments.Grpc.NiXnet.Property.SessionIntfCanTerm
});
if (get_cantermination_reply.Status == 0)
{
var term = get_cantermination_reply.U32Scalar; //THIS IS STILL 0
Console.WriteLine($"Getting CAN Termination:{term}");
}
bkeryan
Metadata
Metadata
Assignees
Labels
No labels