Skip to content

VectorBus: permissionMask should be set before calling xlOpenPort #186

@oomzay

Description

@oomzay

@ Version 2.0.0b1

The permissionMask parameter is both input & output to xlOpenPort and must be set before the call to xlOpenPort in order to request "init access" permission. This is necessary, for example, if the bitrate is to be changed later with a call to xlCanSetChannelBitrate.

I.e. In class VectorBus...

 permission_mask = vxlapi.XLaccess()
 # HERE: Set mask to request init permission if needed
 if bitrate:
     permission_mask.value = self.mask   
 vxlapi.xlOpenPort(self.port_handle, self._app_name, self.mask,
                        permission_mask, rx_queue_size, ...

Failure to set this mask results in the following warning when trying to set the bitrate.

'Can not set bitrate since no init access'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions