SetSchedule returns errWrongParameterValue
Posted: Mon 26. Sep 2022, 10:53
Hello,
I try to configure a Scheduling table for my PLin USB in C++ but cannot quite figure out what I am doing wrong:
mApi is an instance of the PLinApiClass.
Before I have done this:
I try to configure a Scheduling table for my PLin USB in C++ but cannot quite figure out what I am doing wrong:
Code: Select all
TLINScheduleSlot schedule[3];
schedule[0].Delay = 10;
schedule[0].FrameId[0] = 0x1E;
schedule[0].Type = sltUnconditional;
schedule[1].Delay = 20;
schedule[1].FrameId[0] = 0x20;
schedule[1].Type = sltUnconditional;
schedule[2].Delay = 10;
schedule[2].FrameId[0] = 0x20;
schedule[2].Type = sltUnconditional;
mApi.SetSchedule(mClientId, mHwId, 0, &schedule[0], 3);
Before I have done this:
Code: Select all
mApi.GetAvailableHardware(buf, sizeof(buf), &realCount);
mHwId = buf[0];
mApi.RegisterClient("HvLin", 0, &mClientId);
mApi.ConnectClient(mClientId, mHwId);
mApi.InitializeHardware(mClientId, mHwId, 2, 19200);