Documentation
¶
Overview ¶
Package iousbhost provides a fluent Go API over the macOS IOUSBHost framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- HostIOSource: HostPipe, HostStream
- HostObject: HostDevice, HostInterface
Index ¶
- Constants
- func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray(vendorID obj.Object, productID obj.Object, bcdDevice obj.Object, ...) obj.Object
- func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray(vendorID obj.Object, productID obj.Object, bcdDevice obj.Object, ...) obj.Object
- func IOUSBGetBillboardDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetConfigurationMaxPowerMilliAmps(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32
- func IOUSBGetContainerIDDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetEndpointAddress(descriptor unsafe.Pointer) uint8
- func IOUSBGetEndpointBurstSize(usbDeviceSpeed uint32, descriptor unsafe.Pointer, ...) uint32
- func IOUSBGetEndpointDirection(descriptor unsafe.Pointer) uint8
- func IOUSBGetEndpointIntervalEncodedMicroframes(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32
- func IOUSBGetEndpointIntervalFrames(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32
- func IOUSBGetEndpointIntervalMicroframes(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32
- func IOUSBGetEndpointMaxPacketSize(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint16
- func IOUSBGetEndpointMaxStreams(usbDeviceSpeed uint32, descriptor unsafe.Pointer, ...) uint32
- func IOUSBGetEndpointMaxStreamsEncoded(usbDeviceSpeed uint32, descriptor unsafe.Pointer, ...) uint32
- func IOUSBGetEndpointMult(usbDeviceSpeed uint32, descriptor unsafe.Pointer, ...) uint8
- func IOUSBGetEndpointNumber(descriptor unsafe.Pointer) uint8
- func IOUSBGetEndpointSynchronizationType(descriptor unsafe.Pointer) uint8
- func IOUSBGetEndpointType(descriptor unsafe.Pointer) uint8
- func IOUSBGetEndpointUsageType(descriptor unsafe.Pointer) uint8
- func IOUSBGetNextAssociatedDescriptor(configurationDescriptor unsafe.Pointer, parentDescriptor unsafe.Pointer, ...) unsafe.Pointer
- func IOUSBGetNextAssociatedDescriptorWithType(configurationDescriptor unsafe.Pointer, parentDescriptor unsafe.Pointer, ...) unsafe.Pointer
- func IOUSBGetNextCapabilityDescriptor(bosDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetNextCapabilityDescriptorWithType(bosDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer
- func IOUSBGetNextDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetNextDescriptorWithType(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, ...) unsafe.Pointer
- func IOUSBGetNextEndpointDescriptor(configurationDescriptor unsafe.Pointer, interfaceDescriptor unsafe.Pointer, ...) unsafe.Pointer
- func IOUSBGetNextInterfaceAssociationDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetNextInterfaceDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetPlatformCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetPlatformCapabilityDescriptorWithUUID(bosDescriptor unsafe.Pointer) (result unsafe.Pointer, uuid uint8)
- func IOUSBGetSuperSpeedDeviceCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor(bosDescriptor unsafe.Pointer) unsafe.Pointer
- func IOUSBHostCIControllerStateToString(controllerState HostCIControllerState) string
- func IOUSBHostCIDeviceSpeedToString(speed HostCIDeviceSpeed) string
- func IOUSBHostCIDeviceStateToString(deviceState HostCIDeviceState) string
- func IOUSBHostCIEndpointStateToString(endpointState HostCIEndpointState) string
- func IOUSBHostCIExceptionTypeToString(exceptionType HostCIExceptionType) string
- func IOUSBHostCILinkStateEnabled(linkState HostCILinkState) bool
- func IOUSBHostCILinkStateToString(linkState HostCILinkState) string
- func IOUSBHostCIMessageStatusToIOReturn(status HostCIMessageStatus) int
- func IOUSBHostCIMessageStatusToString(status HostCIMessageStatus) string
- func IOUSBHostCIMessageTypeToString(type_ HostCIMessageType) string
- func IOUSBHostCIPortStateToString(portState HostCIPortState) string
- func IOUSBHostDefaultControlCompletionTimeout() float64
- func IOUSBHostDevicePropertyKeyContainerID() obj.Object
- func IOUSBHostDevicePropertyKeyCurrentConfiguration() obj.Object
- func IOUSBHostDevicePropertyKeySerialNumberString() obj.Object
- func IOUSBHostDevicePropertyKeyVendorString() obj.Object
- func IOUSBHostDeviceRequestType(direction unsafe.Pointer, type_ unsafe.Pointer, recipient unsafe.Pointer) uint8
- func IOUSBHostErrorDomain() obj.Object
- func IOUSBHostInterfacePropertyKeyAlternateSetting() obj.Object
- func IOUSBHostMatchingPropertyKeyConfigurationValue() obj.Object
- func IOUSBHostMatchingPropertyKeyDeviceClass() obj.Object
- func IOUSBHostMatchingPropertyKeyDeviceProtocol() obj.Object
- func IOUSBHostMatchingPropertyKeyDeviceReleaseNumber() obj.Object
- func IOUSBHostMatchingPropertyKeyDeviceSubClass() obj.Object
- func IOUSBHostMatchingPropertyKeyInterfaceClass() obj.Object
- func IOUSBHostMatchingPropertyKeyInterfaceNumber() obj.Object
- func IOUSBHostMatchingPropertyKeyInterfaceProtocol() obj.Object
- func IOUSBHostMatchingPropertyKeyInterfaceSubClass() obj.Object
- func IOUSBHostMatchingPropertyKeyProductID() obj.Object
- func IOUSBHostMatchingPropertyKeyProductIDArray() obj.Object
- func IOUSBHostMatchingPropertyKeyProductIDMask() obj.Object
- func IOUSBHostMatchingPropertyKeySpeed() obj.Object
- func IOUSBHostMatchingPropertyKeyVendorID() obj.Object
- func IOUSBHostPropertyKeyLocationID() obj.Object
- func IOUSBHostVersionNumber() float64
- func IOUSBHostVersionString() uintptr
- type Clockid
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type EntryID
- type FilesecProperty
- type Flag
- type HostAbortOption
- type HostCIControllerState
- type HostCIControllerStateMachine
- func (hccsm *HostCIControllerStateMachine) ControllerInterface() *HostControllerInterface
- func (hccsm *HostCIControllerStateMachine) ControllerState() HostCIControllerState
- func (hccsm *HostCIControllerStateMachine) Description() string
- func (hccsm *HostCIControllerStateMachine) EnqueueUpdatedFrameTimestamp(frame uint64, timestamp uint64) error
- func (hccsm *HostCIControllerStateMachine) IsEqual(other obj.Object) bool
- func (hccsm *HostCIControllerStateMachine) IsKind(className string) bool
- func (hccsm *HostCIControllerStateMachine) String() string
- type HostCIDeviceSpeed
- type HostCIDeviceState
- type HostCIDeviceStateMachine
- func (hcdsm *HostCIDeviceStateMachine) CompleteRoute() int
- func (hcdsm *HostCIDeviceStateMachine) ControllerInterface() *HostControllerInterface
- func (hcdsm *HostCIDeviceStateMachine) Description() string
- func (hcdsm *HostCIDeviceStateMachine) DeviceAddress() int
- func (hcdsm *HostCIDeviceStateMachine) DeviceState() HostCIDeviceState
- func (hcdsm *HostCIDeviceStateMachine) IsEqual(other obj.Object) bool
- func (hcdsm *HostCIDeviceStateMachine) IsKind(className string) bool
- func (hcdsm *HostCIDeviceStateMachine) String() string
- type HostCIEndpointState
- type HostCIEndpointStateMachine
- func (hcesm *HostCIEndpointStateMachine) ControllerInterface() *HostControllerInterface
- func (hcesm *HostCIEndpointStateMachine) Description() string
- func (hcesm *HostCIEndpointStateMachine) DeviceAddress() int
- func (hcesm *HostCIEndpointStateMachine) EndpointAddress() int
- func (hcesm *HostCIEndpointStateMachine) EndpointState() HostCIEndpointState
- func (hcesm *HostCIEndpointStateMachine) IsEqual(other obj.Object) bool
- func (hcesm *HostCIEndpointStateMachine) IsKind(className string) bool
- func (hcesm *HostCIEndpointStateMachine) ProcessDoorbell(doorbell uint32) error
- func (hcesm *HostCIEndpointStateMachine) String() string
- type HostCIExceptionType
- type HostCILinkState
- type HostCIMessageStatus
- type HostCIMessageType
- type HostCIPortState
- type HostCIPortStateMachine
- func (hcpsm *HostCIPortStateMachine) Connected() bool
- func (hcpsm *HostCIPortStateMachine) ControllerInterface() *HostControllerInterface
- func (hcpsm *HostCIPortStateMachine) Description() string
- func (hcpsm *HostCIPortStateMachine) IsEqual(other obj.Object) bool
- func (hcpsm *HostCIPortStateMachine) IsKind(className string) bool
- func (hcpsm *HostCIPortStateMachine) LinkState() HostCILinkState
- func (hcpsm *HostCIPortStateMachine) Overcurrent() bool
- func (hcpsm *HostCIPortStateMachine) PortNumber() int
- func (hcpsm *HostCIPortStateMachine) PortState() HostCIPortState
- func (hcpsm *HostCIPortStateMachine) PortStatus() uint32
- func (hcpsm *HostCIPortStateMachine) Powered() bool
- func (hcpsm *HostCIPortStateMachine) Speed() HostCIDeviceSpeed
- func (hcpsm *HostCIPortStateMachine) String() string
- func (hcpsm *HostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChange(linkState HostCILinkState, speed HostCIDeviceSpeed, ...) error
- func (hcpsm *HostCIPortStateMachine) WithConnected(connected bool) *HostCIPortStateMachine
- func (hcpsm *HostCIPortStateMachine) WithOvercurrent(overcurrent bool) *HostCIPortStateMachine
- func (hcpsm *HostCIPortStateMachine) WithPowered(powered bool) *HostCIPortStateMachine
- type HostCIUserClientVersion
- type HostControllerInterface
- func (hci *HostControllerInterface) ControllerStateMachine() *HostCIControllerStateMachine
- func (hci *HostControllerInterface) Description() string
- func (hci *HostControllerInterface) Destroy()
- func (hci *HostControllerInterface) GetPortStateMachineForPort(port int) (result *HostCIPortStateMachine, err error)
- func (hci *HostControllerInterface) InterruptRateHz() int
- func (hci *HostControllerInterface) IsEqual(other obj.Object) bool
- func (hci *HostControllerInterface) IsKind(className string) bool
- func (hci *HostControllerInterface) Queue() *foundation.Object
- func (hci *HostControllerInterface) String() string
- func (hci *HostControllerInterface) UUID() *foundation.UUID
- func (hci *HostControllerInterface) WithInterruptRateHz(interruptRateHz int) *HostControllerInterface
- type HostDevice
- type HostIOSource
- func (his *HostIOSource) Description() string
- func (his *HostIOSource) DeviceAddress() int
- func (his *HostIOSource) EndpointAddress() int
- func (his *HostIOSource) HostInterface() *HostInterface
- func (his *HostIOSource) IsEqual(other obj.Object) bool
- func (his *HostIOSource) IsKind(className string) bool
- func (his *HostIOSource) String() string
- type HostIOSourceProvider
- type HostInterface
- type HostIsochronousTransactionOptions
- type HostIsochronousTransferOptions
- type HostObject
- func (ho *HostObject) AbortDeviceRequests() error
- func (ho *HostObject) AbortDeviceRequestsWithOption(option HostAbortOption) error
- func (ho *HostObject) CurrentMicroframeWithTime() (result uint64, time_ uint64, err error)
- func (ho *HostObject) Description() string
- func (ho *HostObject) Destroy()
- func (ho *HostObject) DestroyWith(options HostObjectDestroyOptions)
- func (ho *HostObject) DeviceAddress() int
- func (ho *HostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler(request unsafe.Pointer, data obj.Object, completionTimeout float64, ...) bool
- func (ho *HostObject) EnqueueDeviceRequestDataErrorCompletionHandler(request unsafe.Pointer, data obj.Object, err unsafe.Pointer, ...) bool
- func (ho *HostObject) EnqueueDeviceRequestErrorCompletionHandler(request unsafe.Pointer, err unsafe.Pointer, completionHandler func(int, uint)) bool
- func (ho *HostObject) FrameNumberWithTime() (result uint64, time_ uint64)
- func (ho *HostObject) IODataWithCapacity(capacity int) (result *foundation.MutableData, err error)
- func (ho *HostObject) IOService() int
- func (ho *HostObject) IsEqual(other obj.Object) bool
- func (ho *HostObject) IsKind(className string) bool
- func (ho *HostObject) Queue() *foundation.Object
- func (ho *HostObject) ReferenceMicroframeWithTime() (result uint64, time_ uint64, err error)
- func (ho *HostObject) SendDeviceRequest(request unsafe.Pointer) error
- func (ho *HostObject) SendDeviceRequestDataBytesTransferred(request unsafe.Pointer, data obj.Object) (bytesTransferred int, err error)
- func (ho *HostObject) SendDeviceRequestDataBytesTransferredCompletionTimeout(request unsafe.Pointer, data obj.Object, completionTimeout float64) (bytesTransferred int, err error)
- func (ho *HostObject) String() string
- func (ho *HostObject) StringWithIndex(index int) (result *foundation.String, err error)
- func (ho *HostObject) StringWithIndexLanguageID(index int, languageID int) (result *foundation.String, err error)
- type HostObjectDestroyOptions
- type HostObjectInitOptions
- type HostObjectProvider
- type HostPipe
- func (hp *HostPipe) Abort() error
- func (hp *HostPipe) AbortWithOption(option HostAbortOption) error
- func (hp *HostPipe) ClearStall() error
- func (hp *HostPipe) CopyStreamWithStreamID(streamID int) (result *HostStream, err error)
- func (hp *HostPipe) DisableStreams() error
- func (hp *HostPipe) EnableStreams() error
- func (hp *HostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler(request unsafe.Pointer, data obj.Object, completionTimeout float64, ...) bool
- func (hp *HostPipe) EnqueueControlRequestDataErrorCompletionHandler(request unsafe.Pointer, data obj.Object, err unsafe.Pointer, ...) bool
- func (hp *HostPipe) EnqueueControlRequestErrorCompletionHandler(request unsafe.Pointer, err unsafe.Pointer, completionHandler func(int, uint)) bool
- func (hp *HostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler(data obj.Object, completionTimeout float64, err unsafe.Pointer, ...) bool
- func (hp *HostPipe) IdleTimeout() float64
- func (hp *HostPipe) SendControlRequest(request unsafe.Pointer) error
- func (hp *HostPipe) SendControlRequestDataBytesTransferred(request unsafe.Pointer, data obj.Object) (bytesTransferred int, err error)
- func (hp *HostPipe) SendControlRequestDataBytesTransferredCompletionTimeout(request unsafe.Pointer, data obj.Object, completionTimeout float64) (bytesTransferred int, err error)
- func (hp *HostPipe) SendIORequestWithDataBytesTransferredCompletionTimeout(data obj.Object, completionTimeout float64) (bytesTransferred int, err error)
- func (hp *HostPipe) SetIdleTimeout(idleTimeout float64) error
- type HostStream
- func (hs *HostStream) Abort() error
- func (hs *HostStream) AbortWithOption(option HostAbortOption) error
- func (hs *HostStream) EnqueueIORequestWithDataErrorCompletionHandler(data obj.Object, err unsafe.Pointer, completionHandler func(int, uint)) bool
- func (hs *HostStream) HostPipe() *HostPipe
- func (hs *HostStream) SendIORequestWithDataBytesTransferred(data obj.Object) (bytesTransferred int, err error)
- func (hs *HostStream) StreamID() int
- type IOUSBHostCIMessage
- type IOUSBHostIOSourceDescriptors
- type IOUSBHostIsochronousFrame
- type IOUSBHostIsochronousTransaction
- type Idtype
- type IpcInfoObjectType
- type LaunchDataType
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type MpoFlags
- type OSClockid
- type Perm
- type PtrauthKey
- type QosClass
- type Tag
- type Type
- type VirtualMemoryGuardExceptionCode
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
const ( HostCICapabilitiesMessageControlPortCount = 983040 HostCICapabilitiesMessageControlPortCountPhase = 16 HostCICapabilitiesMessageData0CommandTimeoutThreshold = 3 HostCICapabilitiesMessageData0CommandTimeoutThresholdPhase = 0 HostCICapabilitiesMessageData0ConnectionLatency = 240 HostCICapabilitiesMessageData0ConnectionLatencyPhase = 4 HostCICommandMessageControlStatus = 3840 HostCICommandMessageControlStatusPhase = 8 HostCICommandMessageData0DeviceAddress = 255 HostCICommandMessageData0DeviceAddressPhase = 0 HostCICommandMessageData0EndpointAddress = 65280 HostCICommandMessageData0EndpointAddressPhase = 8 HostCICommandMessageData0RootPort = 15 HostCICommandMessageData0RootPortPhase = 0 HostCICommandMessageData0StreamID = 4294901760 HostCICommandMessageData0StreamIDPhase = 16 HostCIDeviceCreateCommandData0RootPort = 15 HostCIDeviceCreateCommandData0RootPortPhase = 0 HostCIDeviceCreateCommandData0Route = 16777200 HostCIDeviceCreateCommandData0RoutePhase = 4 HostCIDeviceCreateCommandData1DeviceAddress = 255 HostCIDeviceCreateCommandData1DeviceAddressPhase = 0 HostCIDeviceUpdateCommandData1DescriptorAddress = 18446744073709551615 HostCIDeviceUpdateCommandData1DescriptorAddressPhase = 0 HostCIDoorbellDeviceAddress = 255 HostCIDoorbellDeviceAddressPhase = 0 HostCIDoorbellEndpointAddress = 65280 HostCIDoorbellEndpointAddressPhase = 8 HostCIDoorbellStreamID = 4294901760 HostCIDoorbellStreamIDPhase = 16 HostCIEndpointCreateCommandData1Descriptor = 18446744073709551615 HostCIEndpointCreateCommandData1DescriptorPhase = 0 HostCIEndpointResetCommandData1ClearState = 1 HostCIEndpointSetNextTransferCommandData1Address = 18446744073709551615 HostCIEndpointSetNextTransferCommandData1AddressPhase = 0 HostCIEndpointUpdateCommandData1Descriptor = 18446744073709551615 HostCIEndpointUpdateCommandData1DescriptorPhase = 0 HostCIIsochronousTransferControlASAP = 16777216 HostCIIsochronousTransferControlFrameNumber = 16711680 HostCIIsochronousTransferControlFrameNumberPhase = 16 HostCIIsochronousTransferData0Length = 268435455 HostCIIsochronousTransferData0LengthPhase = 0 HostCIIsochronousTransferData1Buffer = 18446744073709551615 HostCIIsochronousTransferData1BufferPhase = 0 HostCILinkData1TransferStructureAddress = 18446744073709551615 HostCILinkData1TransferStructureAddressPhase = 0 HostCIMessageControlNoResponse = 16384 HostCIMessageControlStatus = 3840 HostCIMessageControlStatusPhase = 8 HostCIMessageControlType = 63 HostCIMessageControlTypePhase = 0 HostCIMessageControlValid = 32768 HostCINormalTransferData0Length = 268435455 HostCINormalTransferData0LengthPhase = 0 HostCINormalTransferData1Buffer = 18446744073709551615 HostCINormalTransferData1BufferPhase = 0 HostCIPortCapabilitiesMessageControlConnectorType = 4278190080 HostCIPortCapabilitiesMessageControlConnectorTypePhase = 24 HostCIPortCapabilitiesMessageControlInternalConnector = 8388608 HostCIPortCapabilitiesMessageControlPortNumber = 983040 HostCIPortCapabilitiesMessageControlPortNumberPhase = 16 HostCIPortCapabilitiesMessageData0MaxPower = 255 HostCIPortCapabilitiesMessageData0MaxPowerPhase = 0 HostCIPortEventMessageData0PortNumber = 15 HostCIPortEventMessageData0PortNumberPhase = 0 HostCIPortStatusChangeMask = 1441792 HostCIPortStatusCommandData1ChangeMask = 1441792 HostCIPortStatusCommandData1ConnectChange = 262144 HostCIPortStatusCommandData1Connected = 4 HostCIPortStatusCommandData1LinkState = 240 HostCIPortStatusCommandData1LinkStateChange = 1048576 HostCIPortStatusCommandData1LinkStatePhase = 4 HostCIPortStatusCommandData1Overcurrent = 2 HostCIPortStatusCommandData1OvercurrentChange = 131072 HostCIPortStatusCommandData1Powered = 1 HostCIPortStatusCommandData1Speed = 1792 HostCIPortStatusCommandData1SpeedPhase = 8 HostCIPortStatusConnectChange = 262144 HostCIPortStatusConnected = 4 HostCIPortStatusLinkState = 240 HostCIPortStatusLinkStateChange = 1048576 HostCIPortStatusLinkStatePhase = 4 HostCIPortStatusOvercurrent = 2 HostCIPortStatusOvercurrentChange = 131072 HostCIPortStatusPowered = 1 HostCIPortStatusSpeed = 1792 HostCIPortStatusSpeedPhase = 8 HostCISetupTransferData1bRequest = 65280 HostCISetupTransferData1bRequestPhase = 8 HostCISetupTransferData1bmRequestType = 255 HostCISetupTransferData1bmRequestTypePhase = 0 HostCISetupTransferData1wIndex = 281470681743360 HostCISetupTransferData1wIndexPhase = 32 HostCISetupTransferData1wLength = 18446462598732840960 HostCISetupTransferData1wLengthPhase = 48 HostCISetupTransferData1wValue = 4294901760 HostCISetupTransferData1wValuePhase = 16 HostCITransferCompletionMessageControlDeviceAddress = 16711680 HostCITransferCompletionMessageControlDeviceAddressPhase = 16 HostCITransferCompletionMessageControlEndpointAddress = 4278190080 HostCITransferCompletionMessageControlEndpointAddressPhase = 24 HostCITransferCompletionMessageControlStatus = 3840 HostCITransferCompletionMessageControlStatusPhase = 8 HostCITransferCompletionMessageData0TransferLength = 268435455 HostCITransferCompletionMessageData0TransferLengthPhase = 0 HostCITransferCompletionMessageData1TransferStructure = 18446744073709551615 HostCITransferCompletionMessageData1TransferStructurePhase = 0 )
Variables ¶
This section is empty.
Functions ¶
func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray ¶ added in v0.17.0
func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray(vendorID obj.Object, productID obj.Object, bcdDevice obj.Object, deviceClass obj.Object, deviceSubclass obj.Object, deviceProtocol obj.Object, speed obj.Object, productIDArray obj.Object) obj.Object
CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceDeviceClassDeviceSubclassDeviceProtocolSpeedProductIDArray creates a matching dictionary to find a USB device.
func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray ¶ added in v0.17.0
func CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray(vendorID obj.Object, productID obj.Object, bcdDevice obj.Object, interfaceNumber obj.Object, configurationValue obj.Object, interfaceClass obj.Object, interfaceSubclass obj.Object, interfaceProtocol obj.Object, speed obj.Object, productIDArray obj.Object) obj.Object
CreateMatchingDictionaryWithVendorIDProductIDBcdDeviceInterfaceNumberConfigurationValueInterfaceClassInterfaceSubclassInterfaceProtocolSpeedProductIDArray creates a matching dictionary to find a USB interface.
func IOUSBGetBillboardDescriptor ¶
IOUSBGetBillboardDescriptor calls the IOUSBHost framework function IOUSBGetBillboardDescriptor.
func IOUSBGetConfigurationMaxPowerMilliAmps ¶
func IOUSBGetConfigurationMaxPowerMilliAmps(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32
IOUSBGetConfigurationMaxPowerMilliAmps calls the IOUSBHost framework function IOUSBGetConfigurationMaxPowerMilliAmps.
func IOUSBGetContainerIDDescriptor ¶
IOUSBGetContainerIDDescriptor calls the IOUSBHost framework function IOUSBGetContainerIDDescriptor.
func IOUSBGetEndpointAddress ¶
IOUSBGetEndpointAddress calls the IOUSBHost framework function IOUSBGetEndpointAddress.
func IOUSBGetEndpointBurstSize ¶
func IOUSBGetEndpointBurstSize(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer, sspCompanionDescriptor unsafe.Pointer) uint32
IOUSBGetEndpointBurstSize calls the IOUSBHost framework function IOUSBGetEndpointBurstSize.
func IOUSBGetEndpointDirection ¶
IOUSBGetEndpointDirection calls the IOUSBHost framework function IOUSBGetEndpointDirection.
func IOUSBGetEndpointIntervalEncodedMicroframes ¶
func IOUSBGetEndpointIntervalEncodedMicroframes(usbDeviceSpeed uint32, descriptor unsafe.Pointer) uint32
IOUSBGetEndpointIntervalEncodedMicroframes calls the IOUSBHost framework function IOUSBGetEndpointIntervalEncodedMicroframes.
func IOUSBGetEndpointIntervalFrames ¶
IOUSBGetEndpointIntervalFrames calls the IOUSBHost framework function IOUSBGetEndpointIntervalFrames.
func IOUSBGetEndpointIntervalMicroframes ¶
IOUSBGetEndpointIntervalMicroframes calls the IOUSBHost framework function IOUSBGetEndpointIntervalMicroframes.
func IOUSBGetEndpointMaxPacketSize ¶
IOUSBGetEndpointMaxPacketSize calls the IOUSBHost framework function IOUSBGetEndpointMaxPacketSize.
func IOUSBGetEndpointMaxStreams ¶
func IOUSBGetEndpointMaxStreams(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer) uint32
IOUSBGetEndpointMaxStreams calls the IOUSBHost framework function IOUSBGetEndpointMaxStreams.
func IOUSBGetEndpointMaxStreamsEncoded ¶
func IOUSBGetEndpointMaxStreamsEncoded(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer) uint32
IOUSBGetEndpointMaxStreamsEncoded calls the IOUSBHost framework function IOUSBGetEndpointMaxStreamsEncoded.
func IOUSBGetEndpointMult ¶
func IOUSBGetEndpointMult(usbDeviceSpeed uint32, descriptor unsafe.Pointer, companionDescriptor unsafe.Pointer, sspCompanionDescriptor unsafe.Pointer) uint8
IOUSBGetEndpointMult calls the IOUSBHost framework function IOUSBGetEndpointMult.
func IOUSBGetEndpointNumber ¶
IOUSBGetEndpointNumber calls the IOUSBHost framework function IOUSBGetEndpointNumber.
func IOUSBGetEndpointSynchronizationType ¶
IOUSBGetEndpointSynchronizationType calls the IOUSBHost framework function IOUSBGetEndpointSynchronizationType.
func IOUSBGetEndpointType ¶
IOUSBGetEndpointType calls the IOUSBHost framework function IOUSBGetEndpointType.
func IOUSBGetEndpointUsageType ¶
IOUSBGetEndpointUsageType calls the IOUSBHost framework function IOUSBGetEndpointUsageType.
func IOUSBGetNextAssociatedDescriptor ¶
func IOUSBGetNextAssociatedDescriptor(configurationDescriptor unsafe.Pointer, parentDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
IOUSBGetNextAssociatedDescriptor calls the IOUSBHost framework function IOUSBGetNextAssociatedDescriptor.
func IOUSBGetNextAssociatedDescriptorWithType ¶
func IOUSBGetNextAssociatedDescriptorWithType(configurationDescriptor unsafe.Pointer, parentDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer
IOUSBGetNextAssociatedDescriptorWithType calls the IOUSBHost framework function IOUSBGetNextAssociatedDescriptorWithType.
func IOUSBGetNextCapabilityDescriptor ¶
func IOUSBGetNextCapabilityDescriptor(bosDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
IOUSBGetNextCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetNextCapabilityDescriptor.
func IOUSBGetNextCapabilityDescriptorWithType ¶
func IOUSBGetNextCapabilityDescriptorWithType(bosDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer
IOUSBGetNextCapabilityDescriptorWithType calls the IOUSBHost framework function IOUSBGetNextCapabilityDescriptorWithType.
func IOUSBGetNextDescriptor ¶
func IOUSBGetNextDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
IOUSBGetNextDescriptor calls the IOUSBHost framework function IOUSBGetNextDescriptor.
func IOUSBGetNextDescriptorWithType ¶
func IOUSBGetNextDescriptorWithType(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer, type_ uint8) unsafe.Pointer
IOUSBGetNextDescriptorWithType calls the IOUSBHost framework function IOUSBGetNextDescriptorWithType.
func IOUSBGetNextEndpointDescriptor ¶
func IOUSBGetNextEndpointDescriptor(configurationDescriptor unsafe.Pointer, interfaceDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
IOUSBGetNextEndpointDescriptor calls the IOUSBHost framework function IOUSBGetNextEndpointDescriptor.
func IOUSBGetNextInterfaceAssociationDescriptor ¶
func IOUSBGetNextInterfaceAssociationDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
IOUSBGetNextInterfaceAssociationDescriptor calls the IOUSBHost framework function IOUSBGetNextInterfaceAssociationDescriptor.
func IOUSBGetNextInterfaceDescriptor ¶
func IOUSBGetNextInterfaceDescriptor(configurationDescriptor unsafe.Pointer, currentDescriptor unsafe.Pointer) unsafe.Pointer
IOUSBGetNextInterfaceDescriptor calls the IOUSBHost framework function IOUSBGetNextInterfaceDescriptor.
func IOUSBGetPlatformCapabilityDescriptor ¶
IOUSBGetPlatformCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetPlatformCapabilityDescriptor.
func IOUSBGetPlatformCapabilityDescriptorWithUUID ¶
func IOUSBGetPlatformCapabilityDescriptorWithUUID(bosDescriptor unsafe.Pointer) (result unsafe.Pointer, uuid uint8)
IOUSBGetPlatformCapabilityDescriptorWithUUID calls the IOUSBHost framework function IOUSBGetPlatformCapabilityDescriptorWithUUID.
func IOUSBGetSuperSpeedDeviceCapabilityDescriptor ¶
IOUSBGetSuperSpeedDeviceCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetSuperSpeedDeviceCapabilityDescriptor.
func IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor ¶
IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor.
func IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor ¶
IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor calls the IOUSBHost framework function IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor.
func IOUSBHostCIControllerStateToString ¶
func IOUSBHostCIControllerStateToString(controllerState HostCIControllerState) string
IOUSBHostCIControllerStateToString calls the IOUSBHost framework function IOUSBHostCIControllerStateToString.
func IOUSBHostCIDeviceSpeedToString ¶
func IOUSBHostCIDeviceSpeedToString(speed HostCIDeviceSpeed) string
IOUSBHostCIDeviceSpeedToString calls the IOUSBHost framework function IOUSBHostCIDeviceSpeedToString.
func IOUSBHostCIDeviceStateToString ¶
func IOUSBHostCIDeviceStateToString(deviceState HostCIDeviceState) string
IOUSBHostCIDeviceStateToString calls the IOUSBHost framework function IOUSBHostCIDeviceStateToString.
func IOUSBHostCIEndpointStateToString ¶
func IOUSBHostCIEndpointStateToString(endpointState HostCIEndpointState) string
IOUSBHostCIEndpointStateToString calls the IOUSBHost framework function IOUSBHostCIEndpointStateToString.
func IOUSBHostCIExceptionTypeToString ¶
func IOUSBHostCIExceptionTypeToString(exceptionType HostCIExceptionType) string
IOUSBHostCIExceptionTypeToString calls the IOUSBHost framework function IOUSBHostCIExceptionTypeToString.
func IOUSBHostCILinkStateEnabled ¶
func IOUSBHostCILinkStateEnabled(linkState HostCILinkState) bool
IOUSBHostCILinkStateEnabled calls the IOUSBHost framework function IOUSBHostCILinkStateEnabled.
func IOUSBHostCILinkStateToString ¶
func IOUSBHostCILinkStateToString(linkState HostCILinkState) string
IOUSBHostCILinkStateToString calls the IOUSBHost framework function IOUSBHostCILinkStateToString.
func IOUSBHostCIMessageStatusToIOReturn ¶
func IOUSBHostCIMessageStatusToIOReturn(status HostCIMessageStatus) int
IOUSBHostCIMessageStatusToIOReturn calls the IOUSBHost framework function IOUSBHostCIMessageStatusToIOReturn.
func IOUSBHostCIMessageStatusToString ¶
func IOUSBHostCIMessageStatusToString(status HostCIMessageStatus) string
IOUSBHostCIMessageStatusToString calls the IOUSBHost framework function IOUSBHostCIMessageStatusToString.
func IOUSBHostCIMessageTypeToString ¶
func IOUSBHostCIMessageTypeToString(type_ HostCIMessageType) string
IOUSBHostCIMessageTypeToString calls the IOUSBHost framework function IOUSBHostCIMessageTypeToString.
func IOUSBHostCIPortStateToString ¶
func IOUSBHostCIPortStateToString(portState HostCIPortState) string
IOUSBHostCIPortStateToString calls the IOUSBHost framework function IOUSBHostCIPortStateToString.
func IOUSBHostDefaultControlCompletionTimeout ¶
func IOUSBHostDefaultControlCompletionTimeout() float64
IOUSBHostDefaultControlCompletionTimeout returns the value of the constant IOUSBHostDefaultControlCompletionTimeout.
func IOUSBHostDevicePropertyKeyContainerID ¶
IOUSBHostDevicePropertyKeyContainerID returns the string constant IOUSBHostDevicePropertyKeyContainerID, for use as a dictionary key or argument.
func IOUSBHostDevicePropertyKeyCurrentConfiguration ¶
IOUSBHostDevicePropertyKeyCurrentConfiguration returns the string constant IOUSBHostDevicePropertyKeyCurrentConfiguration, for use as a dictionary key or argument.
func IOUSBHostDevicePropertyKeySerialNumberString ¶
IOUSBHostDevicePropertyKeySerialNumberString returns the string constant IOUSBHostDevicePropertyKeySerialNumberString, for use as a dictionary key or argument.
func IOUSBHostDevicePropertyKeyVendorString ¶
IOUSBHostDevicePropertyKeyVendorString returns the string constant IOUSBHostDevicePropertyKeyVendorString, for use as a dictionary key or argument.
func IOUSBHostDeviceRequestType ¶
func IOUSBHostDeviceRequestType(direction unsafe.Pointer, type_ unsafe.Pointer, recipient unsafe.Pointer) uint8
IOUSBHostDeviceRequestType calls the IOUSBHost framework function IOUSBHostDeviceRequestType.
func IOUSBHostErrorDomain ¶
IOUSBHostErrorDomain returns the string constant IOUSBHostErrorDomain, for use as a dictionary key or argument.
func IOUSBHostInterfacePropertyKeyAlternateSetting ¶
IOUSBHostInterfacePropertyKeyAlternateSetting returns the string constant IOUSBHostInterfacePropertyKeyAlternateSetting, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyConfigurationValue ¶
IOUSBHostMatchingPropertyKeyConfigurationValue returns the string constant IOUSBHostMatchingPropertyKeyConfigurationValue, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyDeviceClass ¶
IOUSBHostMatchingPropertyKeyDeviceClass returns the string constant IOUSBHostMatchingPropertyKeyDeviceClass, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyDeviceProtocol ¶
IOUSBHostMatchingPropertyKeyDeviceProtocol returns the string constant IOUSBHostMatchingPropertyKeyDeviceProtocol, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyDeviceReleaseNumber ¶
IOUSBHostMatchingPropertyKeyDeviceReleaseNumber returns the string constant IOUSBHostMatchingPropertyKeyDeviceReleaseNumber, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyDeviceSubClass ¶
IOUSBHostMatchingPropertyKeyDeviceSubClass returns the string constant IOUSBHostMatchingPropertyKeyDeviceSubClass, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyInterfaceClass ¶
IOUSBHostMatchingPropertyKeyInterfaceClass returns the string constant IOUSBHostMatchingPropertyKeyInterfaceClass, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyInterfaceNumber ¶
IOUSBHostMatchingPropertyKeyInterfaceNumber returns the string constant IOUSBHostMatchingPropertyKeyInterfaceNumber, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyInterfaceProtocol ¶
IOUSBHostMatchingPropertyKeyInterfaceProtocol returns the string constant IOUSBHostMatchingPropertyKeyInterfaceProtocol, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyInterfaceSubClass ¶
IOUSBHostMatchingPropertyKeyInterfaceSubClass returns the string constant IOUSBHostMatchingPropertyKeyInterfaceSubClass, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyProductID ¶
IOUSBHostMatchingPropertyKeyProductID returns the string constant IOUSBHostMatchingPropertyKeyProductID, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyProductIDArray ¶
IOUSBHostMatchingPropertyKeyProductIDArray returns the string constant IOUSBHostMatchingPropertyKeyProductIDArray, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyProductIDMask ¶
IOUSBHostMatchingPropertyKeyProductIDMask returns the string constant IOUSBHostMatchingPropertyKeyProductIDMask, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeySpeed ¶
IOUSBHostMatchingPropertyKeySpeed returns the string constant IOUSBHostMatchingPropertyKeySpeed, for use as a dictionary key or argument.
func IOUSBHostMatchingPropertyKeyVendorID ¶
IOUSBHostMatchingPropertyKeyVendorID returns the string constant IOUSBHostMatchingPropertyKeyVendorID, for use as a dictionary key or argument.
func IOUSBHostPropertyKeyLocationID ¶
IOUSBHostPropertyKeyLocationID returns the string constant IOUSBHostPropertyKeyLocationID, for use as a dictionary key or argument.
func IOUSBHostVersionNumber ¶
func IOUSBHostVersionNumber() float64
IOUSBHostVersionNumber returns the value of the constant IOUSBHostVersionNumber.
func IOUSBHostVersionString ¶
func IOUSBHostVersionString() uintptr
IOUSBHostVersionString returns the address of the symbol IOUSBHostVersionString.
Types ¶
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int64
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type HostAbortOption ¶ added in v0.17.0
type HostAbortOption uint64
Options for aborting pending input/output requests.
const ( // The option to abort input/output requests asynchronously. HostAbortOptionAsynchronous HostAbortOption = 0 // The option to abort input/output requests synchronously. HostAbortOptionSynchronous HostAbortOption = 1 )
func (HostAbortOption) String ¶ added in v0.17.0
func (e HostAbortOption) String() string
String returns the HostAbortOption constant's name, or its numeric form when the value is not a known constant.
type HostCIControllerState ¶ added in v0.17.0
type HostCIControllerState int64
Host controller state managed by IOUSBHostCIControllerStateMachine IOUSBHostCIControllerStateOff is the initial state of a newly created IOUSBHostCIControllerStateMachine instance, and represents a completely quiesced controller. All root ports must be in the IOUSBHostCIPortStateOff state. IOUSBHostCIControllerStatePaused represents a controller that is idle. In this state the controller is not processing IO requests, but can detect port changes such as connect events or remote wakes. Root ports must not be in the IOUSBHostCIPortStateActive state. IOUSBHostCIControllerStateActive represents a controller that is fully functional and able to service IO requests. Root ports may be in the IOUSBHostCIPortStateActive state.
const ( HostCIControllerStateOff HostCIControllerState = 0 HostCIControllerStatePaused HostCIControllerState = 1 HostCIControllerStateActive HostCIControllerState = 2 )
func (HostCIControllerState) String ¶ added in v0.17.0
func (e HostCIControllerState) String() string
String returns the HostCIControllerState constant's name, or its numeric form when the value is not a known constant.
type HostCIControllerStateMachine ¶ added in v0.17.0
HostCIControllerStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIControllerStateMachine.
The object representing the state of a user-mode USB host controller This class assists with tracking internal state transitions of a user-mode USB host controller, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. IOUSBHostCIControllerStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.
func HostCIControllerStateMachineFromID ¶ added in v0.17.0
func HostCIControllerStateMachineFromID(id objc.ID) *HostCIControllerStateMachine
HostCIControllerStateMachineFromID adopts an existing Objective-C object as a HostCIControllerStateMachine (nil for 0), retaining it and registering a release finalizer.
func NewHostCIControllerStateMachineWithInterface ¶ added in v0.17.0
func NewHostCIControllerStateMachineWithInterface(interface_ *HostControllerInterface) (result *HostCIControllerStateMachine, err error)
NewHostCIControllerStateMachineWithInterface initializes an IOUSBHostCIControllerStateMachine object The IOUSBHostCIControllerStateMachine defaults to the IOUSBHostCIControllerStateOff state.
func (*HostCIControllerStateMachine) ControllerInterface ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) ControllerInterface() *HostControllerInterface
ControllerInterface returns the controller interface.
func (*HostCIControllerStateMachine) ControllerState ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) ControllerState() HostCIControllerState
ControllerState returns the controller state.
func (*HostCIControllerStateMachine) Description ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) Description() string
Description returns the object's -description text.
func (*HostCIControllerStateMachine) EnqueueUpdatedFrameTimestamp ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) EnqueueUpdatedFrameTimestamp(frame uint64, timestamp uint64) error
EnqueueUpdatedFrameTimestamp enqueue frame and timestamp messages for delivery to the kernel driver If the controller interface is in the IOUSBHostCIControllerStateActive state, messages with the type IOUSBHostCIMessageTypeFrameNumberUpdate and IOUSBHostCIMessageTypeFrameTimestampUpdate will be generated using the provided inputs, and enqueued for delivery to the kernel driver. The frame and timestamp information provided effectively measure the duration of the controller's 1ms frame in terms of system time. A 1% frame duration variation is permitted. A larger frame duration variation will result in a IOUSBHostCIExceptionTypeFrameUpdateError.
func (*HostCIControllerStateMachine) IsEqual ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostCIControllerStateMachine) IsKind ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostCIControllerStateMachine) String ¶ added in v0.17.0
func (hccsm *HostCIControllerStateMachine) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type HostCIDeviceSpeed ¶ added in v0.17.0
type HostCIDeviceSpeed int64
Values to represent a connected device speed, to be used in IOUSBHostCIMessages and IOUSBHostsCIPortStatus
const ( HostCIDeviceSpeedNone HostCIDeviceSpeed = 0 HostCIDeviceSpeedFull HostCIDeviceSpeed = 1 HostCIDeviceSpeedLow HostCIDeviceSpeed = 2 HostCIDeviceSpeedHigh HostCIDeviceSpeed = 3 HostCIDeviceSpeedSuper HostCIDeviceSpeed = 4 HostCIDeviceSpeedSuperPlus HostCIDeviceSpeed = 5 HostCIDeviceSpeedSuperPlusBy2 HostCIDeviceSpeed = 6 HostCIDeviceSpeedOther HostCIDeviceSpeed = 7 )
func (HostCIDeviceSpeed) String ¶ added in v0.17.0
func (e HostCIDeviceSpeed) String() string
String returns the HostCIDeviceSpeed constant's name, or its numeric form when the value is not a known constant.
type HostCIDeviceState ¶ added in v0.17.0
type HostCIDeviceState int64
Device state managed by IOUSBHostCIDeviceStateMachine IOUSBHostCIDeviceStateDestroyed represents a device that is no longer usable, and whose resources will be destroyed and freed IOUSBHostCIDeviceStatePaused represents a device that may have IO requests enqueued, but they are not active on the bus. The state is closely correlated to IOUSBHostCIPortStateSuspended, and endpoints associated with this device may not be in the IOUSBHostCIEndpointStateActive state. IOUSBHostCIDeviceStateActive is the initial sate of a newly created IOUSBHsotCIDeviceStateMachine, and represents a device that can be processing IO requests. Endpoints associated with this device may be in the IOUSBHostCIEndpointStateActive state.
const ( HostCIDeviceStateDestroyed HostCIDeviceState = 0 HostCIDeviceStatePaused HostCIDeviceState = 1 HostCIDeviceStateActive HostCIDeviceState = 2 )
func (HostCIDeviceState) String ¶ added in v0.17.0
func (e HostCIDeviceState) String() string
String returns the HostCIDeviceState constant's name, or its numeric form when the value is not a known constant.
type HostCIDeviceStateMachine ¶ added in v0.17.0
HostCIDeviceStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIDeviceStateMachine.
The object representing the state of a user-mode USB host controller device This class assists with tracking internal state transitions of a user-mode USB host controller device, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. Clients should create an IOUSBHostCIDeviceStateMachine in response to an IOUSBHostCIMessageTypeDeviceCreate command, and then use the provided interfaces to identify and process commands for the device. The IOUSBHostCIDeviceStateMachine should be destroyed in response to an IOUSBHostCIMessageTypeDeviceDestroy command. IOUSBHostCIDeviceStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.
func HostCIDeviceStateMachineFromID ¶ added in v0.17.0
func HostCIDeviceStateMachineFromID(id objc.ID) *HostCIDeviceStateMachine
HostCIDeviceStateMachineFromID adopts an existing Objective-C object as a HostCIDeviceStateMachine (nil for 0), retaining it and registering a release finalizer.
func NewHostCIDeviceStateMachine ¶ added in v0.17.0
func NewHostCIDeviceStateMachine() *HostCIDeviceStateMachine
NewHostCIDeviceStateMachine creates a new HostCIDeviceStateMachine.
func (*HostCIDeviceStateMachine) CompleteRoute ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) CompleteRoute() int
CompleteRoute returns the complete route.
func (*HostCIDeviceStateMachine) ControllerInterface ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) ControllerInterface() *HostControllerInterface
ControllerInterface returns the controller interface.
func (*HostCIDeviceStateMachine) Description ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) Description() string
Description returns the object's -description text.
func (*HostCIDeviceStateMachine) DeviceAddress ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) DeviceAddress() int
DeviceAddress returns the device address.
func (*HostCIDeviceStateMachine) DeviceState ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) DeviceState() HostCIDeviceState
DeviceState returns the device state.
func (*HostCIDeviceStateMachine) IsEqual ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostCIDeviceStateMachine) IsKind ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostCIDeviceStateMachine) String ¶ added in v0.17.0
func (hcdsm *HostCIDeviceStateMachine) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type HostCIEndpointState ¶ added in v0.17.0
type HostCIEndpointState int64
Endpoint state managed by IOUSBHostCIEndpointStateMachine IOUSBHostCIEndpointStateDestroyed represents an endpoint that is no longer usable, and whose resources will be destroyed and freed. IOUSBHostCIEndpointStateHalted represents an endpoint that has encountered an IO error. The client must not access or modify transfer structures or IO buffers for an endpoint in this state. IOUSBHostCIEndpointStatePaused is the initial state of a newly created IOUSBHostCIEndpointStateMachine, and represents an endpoint that is not currently servicing IO requests. The client must not access or modify transfer structures or IO buffers for an endpoint in this state. IOUSBHostCIEndpointStateActive represents an endpoint that is currently servicing an IO request, or is idle after successfully servicing its queue of IO requests. In this state the client may access transfer structures and IO buffers.
const ( HostCIEndpointStateDestroyed HostCIEndpointState = 0 HostCIEndpointStateHalted HostCIEndpointState = 1 HostCIEndpointStatePaused HostCIEndpointState = 2 HostCIEndpointStateActive HostCIEndpointState = 3 )
func (HostCIEndpointState) String ¶ added in v0.17.0
func (e HostCIEndpointState) String() string
String returns the HostCIEndpointState constant's name, or its numeric form when the value is not a known constant.
type HostCIEndpointStateMachine ¶ added in v0.17.0
HostCIEndpointStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIEndpointStateMachine.
The object representing the state of a user-mode USB host controller endpoint This class assists with tracking internal state transitions of a user-mode USB host controller endpoint, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. Clients should create an IOUSBHostCIEndpointStateMachine in response to an IOUSBHostCIMessageTypeEndpointCreate command, and then use the provided interfaces to identify and process commands, doorbells, and transfer structures for the endpoint. The IOUSBHostCIEndpointStateMachine should be destroyed in response to an IOUSBHostCIMessageTypeEndpointDestroy command. Endpoint state is controlled by IOUSBHostCIMessage structures representing commands and transfer completions, and IOUSBHostCIDoorbell messages. Only an endpoint in the IOUSBHostCIEndpointStateActive state may inspect transfer structures, read or modify IO buffers, and generate transfer completions. IOUSBHostCIEndpointStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.
func HostCIEndpointStateMachineFromID ¶ added in v0.17.0
func HostCIEndpointStateMachineFromID(id objc.ID) *HostCIEndpointStateMachine
HostCIEndpointStateMachineFromID adopts an existing Objective-C object as a HostCIEndpointStateMachine (nil for 0), retaining it and registering a release finalizer.
func NewHostCIEndpointStateMachine ¶ added in v0.17.0
func NewHostCIEndpointStateMachine() *HostCIEndpointStateMachine
NewHostCIEndpointStateMachine creates a new HostCIEndpointStateMachine.
func (*HostCIEndpointStateMachine) ControllerInterface ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) ControllerInterface() *HostControllerInterface
ControllerInterface returns the controller interface.
func (*HostCIEndpointStateMachine) Description ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) Description() string
Description returns the object's -description text.
func (*HostCIEndpointStateMachine) DeviceAddress ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) DeviceAddress() int
DeviceAddress returns the device address.
func (*HostCIEndpointStateMachine) EndpointAddress ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) EndpointAddress() int
EndpointAddress returns the endpoint address.
func (*HostCIEndpointStateMachine) EndpointState ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) EndpointState() HostCIEndpointState
EndpointState returns the endpoint state.
func (*HostCIEndpointStateMachine) IsEqual ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostCIEndpointStateMachine) IsKind ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostCIEndpointStateMachine) ProcessDoorbell ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) ProcessDoorbell(doorbell uint32) error
ProcessDoorbell advance the state machine and process an IOUSBHostCIDoorbell message The IOUSBHostCIDoorbell is inspected to determine if it is handled by this state machine and is appropriate for the current state. If successful, the client should check for an IOUSBHostCIEndpointStateActive endpointState and a currentTransferMessage with IOUSBHostCIMessageControlValid set to determine if more IOUSBHostCIMessages should be processed.
func (*HostCIEndpointStateMachine) String ¶ added in v0.17.0
func (hcesm *HostCIEndpointStateMachine) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type HostCIExceptionType ¶ added in v0.17.0
type HostCIExceptionType int64
Exception specifier included as message argument to <code>kUSBHostMessageControllerException</code> The kernel driver sends a <code>kUSBHostMessageControllerException</code> message to its clients when a fatal problem has occurred, with a refCon of the IOUSBHostController instance and a <code>IOUSBHostCIExceptionType</code> in the message arguments. When any <code>kUSBHostMessageControllerException</code> message is received, the specified IOUSBHostControllerInterface must be destroyed.
const ( HostCIExceptionTypeUnknown HostCIExceptionType = 0 HostCIExceptionTypeCapabilitiesInvalid HostCIExceptionType = 1 HostCIExceptionTypeTerminated HostCIExceptionType = 2 HostCIExceptionTypeCommandReadCollision HostCIExceptionType = 3 HostCIExceptionTypeCommandWriteFailed HostCIExceptionType = 4 HostCIExceptionTypeCommandTimeout HostCIExceptionType = 5 HostCIExceptionTypeCommandFailure HostCIExceptionType = 6 HostCIExceptionTypeInterruptInvalid HostCIExceptionType = 7 HostCIExceptionTypeInterruptOverflow HostCIExceptionType = 8 HostCIExceptionTypeDoorbellReadCollision HostCIExceptionType = 9 HostCIExceptionTypeDoorbellOverflow HostCIExceptionType = 10 HostCIExceptionTypeProtocolError HostCIExceptionType = 11 HostCIExceptionTypeFrameUpdateError HostCIExceptionType = 12 )
func (HostCIExceptionType) String ¶ added in v0.17.0
func (e HostCIExceptionType) String() string
String returns the HostCIExceptionType constant's name, or its numeric form when the value is not a known constant.
type HostCILinkState ¶ added in v0.17.0
type HostCILinkState int64
Values to represent a port's link state, to be used in IOUSBHostCIMessages and IOUSBHostCIPortStatus
const ( HostCILinkStateU0 HostCILinkState = 0 HostCILinkStateU1 HostCILinkState = 1 HostCILinkStateU2 HostCILinkState = 2 HostCILinkStateU3 HostCILinkState = 3 HostCILinkStateDisabled HostCILinkState = 4 HostCILinkStateRxDetect HostCILinkState = 5 HostCILinkStateInactive HostCILinkState = 6 HostCILinkStatePolling HostCILinkState = 7 HostCILinkStateRecovery HostCILinkState = 8 HostCILinkStateReset HostCILinkState = 9 HostCILinkStateCompliance HostCILinkState = 10 HostCILinkStateTest HostCILinkState = 11 HostCILinkStateResume HostCILinkState = 15 )
func (HostCILinkState) String ¶ added in v0.17.0
func (e HostCILinkState) String() string
String returns the HostCILinkState constant's name, or its numeric form when the value is not a known constant.
type HostCIMessageStatus ¶ added in v0.17.0
type HostCIMessageStatus int64
Values to be populated in IOUSBHostCIMessageControlStatus of an IOUSBHostCIMessage structure
const ( HostCIMessageStatusReserved HostCIMessageStatus = 0 HostCIMessageStatusSuccess HostCIMessageStatus = 1 HostCIMessageStatusOffline HostCIMessageStatus = 2 HostCIMessageStatusNotPermitted HostCIMessageStatus = 3 HostCIMessageStatusBadArgument HostCIMessageStatus = 4 HostCIMessageStatusTimeout HostCIMessageStatus = 5 HostCIMessageStatusNoResources HostCIMessageStatus = 6 HostCIMessageStatusEndpointStopped HostCIMessageStatus = 7 HostCIMessageStatusProtocolError HostCIMessageStatus = 8 HostCIMessageStatusTransactionError HostCIMessageStatus = 9 HostCIMessageStatusOverrunError HostCIMessageStatus = 10 HostCIMessageStatusStallError HostCIMessageStatus = 11 HostCIMessageStatusMissedServiceError HostCIMessageStatus = 12 HostCIMessageStatusError HostCIMessageStatus = 13 )
func IOUSBHostCIMessageStatusFromIOReturn ¶
func IOUSBHostCIMessageStatusFromIOReturn(status int) HostCIMessageStatus
IOUSBHostCIMessageStatusFromIOReturn calls the IOUSBHost framework function IOUSBHostCIMessageStatusFromIOReturn.
func (HostCIMessageStatus) String ¶ added in v0.17.0
func (e HostCIMessageStatus) String() string
String returns the HostCIMessageStatus constant's name, or its numeric form when the value is not a known constant.
type HostCIMessageType ¶ added in v0.17.0
type HostCIMessageType int64
Values to be populated in IOUSBHostCIMessageControlType of an IOUSBHostCIMessage structure
const ( HostCIMessageTypeControllerCapabilities HostCIMessageType = 0 HostCIMessageTypePortCapabilities HostCIMessageType = 1 HostCIMessageTypePortEvent HostCIMessageType = 8 HostCIMessageTypeFrameNumberUpdate HostCIMessageType = 9 HostCIMessageTypeFrameTimestampUpdate HostCIMessageType = 10 HostCIMessageTypeCommandMin HostCIMessageType = 16 HostCIMessageTypeControllerPowerOn HostCIMessageType = 16 HostCIMessageTypeControllerPowerOff HostCIMessageType = 17 HostCIMessageTypeControllerStart HostCIMessageType = 18 HostCIMessageTypeControllerPause HostCIMessageType = 19 HostCIMessageTypeControllerFrameNumber HostCIMessageType = 20 HostCIMessageTypePortPowerOn HostCIMessageType = 24 HostCIMessageTypePortPowerOff HostCIMessageType = 25 HostCIMessageTypePortResume HostCIMessageType = 26 HostCIMessageTypePortSuspend HostCIMessageType = 27 HostCIMessageTypePortReset HostCIMessageType = 28 HostCIMessageTypePortDisable HostCIMessageType = 29 HostCIMessageTypePortStatus HostCIMessageType = 30 HostCIMessageTypeDeviceCreate HostCIMessageType = 32 HostCIMessageTypeDeviceDestroy HostCIMessageType = 33 HostCIMessageTypeDeviceStart HostCIMessageType = 34 HostCIMessageTypeDevicePause HostCIMessageType = 35 HostCIMessageTypeDeviceUpdate HostCIMessageType = 36 HostCIMessageTypeEndpointCreate HostCIMessageType = 40 HostCIMessageTypeEndpointDestroy HostCIMessageType = 41 HostCIMessageTypeEndpoint_reserved_ HostCIMessageType = 42 HostCIMessageTypeEndpointPause HostCIMessageType = 43 HostCIMessageTypeEndpointUpdate HostCIMessageType = 44 HostCIMessageTypeEndpointReset HostCIMessageType = 45 HostCIMessageTypeEndpointSetNextTransfer HostCIMessageType = 46 HostCIMessageTypeCommandMax HostCIMessageType = 55 HostCIMessageTypeSetupTransfer HostCIMessageType = 56 HostCIMessageTypeNormalTransfer HostCIMessageType = 57 HostCIMessageTypeStatusTransfer HostCIMessageType = 58 HostCIMessageTypeIsochronousTransfer HostCIMessageType = 59 HostCIMessageTypeLink HostCIMessageType = 60 HostCIMessageTypeTransferComplete HostCIMessageType = 61 )
func (HostCIMessageType) String ¶ added in v0.17.0
func (e HostCIMessageType) String() string
String returns the HostCIMessageType constant's name, or its numeric form when the value is not a known constant.
type HostCIPortState ¶ added in v0.17.0
type HostCIPortState int64
Port state managed by IOUSBHostCIPortStateMachine IOUSBHostCIPortStateOff is the initial state of a newly created IOUSBHostCIPortStateMachine and represents an unpowered port which is unable to detect events such as connections. Downstream devices, if any, must be in the IOUSBHostCIDeviceStateDestroyed state. IOUSBHostCIPortStatePowered represents a powered port which is able to detect events such as connections. Downstream devices, if any, must be in the IOUSBHostCIDeviceStateDestroyed state. IOUSBHostCIPortStateSuspended represents a port with a downstream device that is in a low-power state such as U3 or L2. The port is able to detect events such as remote wakes, and is not actively transmitting data. Downstream devices must be in the IOUSBHostCIDeviceStatePaused state. IOUSBHostCIPortStateActive represents a port with a downstream device that is able to immediately transfer data. The downstream device may be in the IOUSBHostCIDeviceStateActive state.
const ( HostCIPortStateOff HostCIPortState = 0 HostCIPortStatePowered HostCIPortState = 1 HostCIPortStateSuspended HostCIPortState = 2 HostCIPortStateActive HostCIPortState = 3 )
func (HostCIPortState) String ¶ added in v0.17.0
func (e HostCIPortState) String() string
String returns the HostCIPortState constant's name, or its numeric form when the value is not a known constant.
type HostCIPortStateMachine ¶ added in v0.17.0
HostCIPortStateMachine is an idiomatic wrapper over the Objective-C class IOUSBHostCIPortStateMachine.
The object representing the state of a user-mode USB host controller root port This class assists with tracking internal state transitions of a user-mode USB host controller root port, and parses IOUSBHostCIMessage command structures to update state and generate properly formatted command responses. IOUSBHostCIPortStateMachine does not provide any concurrency protection, the client is responsible for necessary serialization.
func HostCIPortStateMachineFromID ¶ added in v0.17.0
func HostCIPortStateMachineFromID(id objc.ID) *HostCIPortStateMachine
HostCIPortStateMachineFromID adopts an existing Objective-C object as a HostCIPortStateMachine (nil for 0), retaining it and registering a release finalizer.
func NewHostCIPortStateMachineWithInterfacePortNumber ¶ added in v0.17.0
func NewHostCIPortStateMachineWithInterfacePortNumber(interface_ *HostControllerInterface, portNumber int) (result *HostCIPortStateMachine, err error)
NewHostCIPortStateMachineWithInterfacePortNumber initializes an IOUSBHostCIPortStateMachine object The IOUSBHostCIPortStateMachine defaults to the IOUSBHostCIPortStateOff state.
func (*HostCIPortStateMachine) Connected ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) Connected() bool
Connected reports whether set the connection state of the port The connected property cannot be set for an unpowered port, and will read back as false, just at IOUSBHostCIPortStatusConnected in the port status will always read as 0. For a powered port, writing to the connected property will set IOUSBHostCIPortStatusConnected to match the provided value, and if the new value is different from the previous value an IOUSBHostCIMessageTypePortEvent message will be sent to the kernel with IOUSBHostCIPortStatusConnectChange set.
func (*HostCIPortStateMachine) ControllerInterface ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) ControllerInterface() *HostControllerInterface
ControllerInterface returns the controller interface.
func (*HostCIPortStateMachine) Description ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) Description() string
Description returns the object's -description text.
func (*HostCIPortStateMachine) IsEqual ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostCIPortStateMachine) IsKind ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostCIPortStateMachine) LinkState ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) LinkState() HostCILinkState
LinkState returns the link state.
func (*HostCIPortStateMachine) Overcurrent ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) Overcurrent() bool
Overcurrent reports whether set the overcurrent state of the port The overcurrent property cannot be set for an unpowered port, and will read back as false, just as IOUSBHostCIPortStatusOvercurrent in the port status will always read as 0. For a powered port, writing to the overcurrent property will set IOUSBHostCIPortStatusOvercurrent to match the provided value, and if the new value is different from the previous value an IOUSBHostCIMessageTypePortEvent message will be sent to the kernel with IOUSBHostCIPortStatusOvercurrentChange set.
func (*HostCIPortStateMachine) PortNumber ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) PortNumber() int
PortNumber returns the port number.
func (*HostCIPortStateMachine) PortState ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) PortState() HostCIPortState
PortState returns the port state.
func (*HostCIPortStateMachine) PortStatus ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) PortStatus() uint32
PortStatus returns the port status.
func (*HostCIPortStateMachine) Powered ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) Powered() bool
Powered reports whether set the powered state of the port Before a port can be used, it must be powered on via a IOUSBHostCIMessageTypePortPowerOn command. As part of successfully processing this command the powered property must be set to true. Similarly, successful processing of the IOUSBHostCIMessageTypePortPowerOff command must set the powered property to false.
func (*HostCIPortStateMachine) Speed ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) Speed() HostCIDeviceSpeed
Speed returns the speed.
func (*HostCIPortStateMachine) String ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChange ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) UpdateLinkStateSpeedInhibitLinkStateChange(linkState HostCILinkState, speed HostCIDeviceSpeed, inhibitLinkStateChange bool) error
UpdateLinkStateSpeedInhibitLinkStateChange updates link state speed inhibit link state change.
func (*HostCIPortStateMachine) WithConnected ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) WithConnected(connected bool) *HostCIPortStateMachine
WithConnected sets set the connection state of the port The connected property cannot be set for an unpowered port, and will read back as NO, just at IOUSBHostCIPortStatusConnected in the port status will always read as 0. For a powered port, writing to the connected property will set IOUSBHostCIPortStatusConnected to match the provided value, and if the new value is different from the previous value an IOUSBHostCIMessageTypePortEvent message will be sent to the kernel with IOUSBHostCIPortStatusConnectChange set.
func (*HostCIPortStateMachine) WithOvercurrent ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) WithOvercurrent(overcurrent bool) *HostCIPortStateMachine
WithOvercurrent sets set the overcurrent state of the port The overcurrent property cannot be set for an unpowered port, and will read back as NO, just as IOUSBHostCIPortStatusOvercurrent in the port status will always read as 0. For a powered port, writing to the overcurrent property will set IOUSBHostCIPortStatusOvercurrent to match the provided value, and if the new value is different from the previous value an IOUSBHostCIMessageTypePortEvent message will be sent to the kernel with IOUSBHostCIPortStatusOvercurrentChange set.
func (*HostCIPortStateMachine) WithPowered ¶ added in v0.17.0
func (hcpsm *HostCIPortStateMachine) WithPowered(powered bool) *HostCIPortStateMachine
WithPowered sets set the powered state of the port Before a port can be used, it must be powered on via a IOUSBHostCIMessageTypePortPowerOn command. As part of successfully processing this command the powered property must be set to YES. Similarly, successful processing of the IOUSBHostCIMessageTypePortPowerOff command must set the powered property to NO.
type HostCIUserClientVersion ¶ added in v0.17.0
type HostCIUserClientVersion int64
const (
HostCIUserClientVersion100 HostCIUserClientVersion = 0
)
func (HostCIUserClientVersion) String ¶ added in v0.17.0
func (e HostCIUserClientVersion) String() string
String returns the HostCIUserClientVersion constant's name, or its numeric form when the value is not a known constant.
type HostControllerInterface ¶ added in v0.17.0
HostControllerInterface is an idiomatic wrapper over the Objective-C class IOUSBHostControllerInterface.
func HostControllerInterfaceFromID ¶ added in v0.17.0
func HostControllerInterfaceFromID(id objc.ID) *HostControllerInterface
HostControllerInterfaceFromID adopts an existing Objective-C object as a HostControllerInterface (nil for 0), retaining it and registering a release finalizer.
func NewHostControllerInterface ¶ added in v0.17.0
func NewHostControllerInterface() *HostControllerInterface
NewHostControllerInterface creates a new HostControllerInterface.
func (*HostControllerInterface) ControllerStateMachine ¶ added in v0.17.0
func (hci *HostControllerInterface) ControllerStateMachine() *HostCIControllerStateMachine
ControllerStateMachine returns the controller state machine.
func (*HostControllerInterface) Description ¶ added in v0.17.0
func (hci *HostControllerInterface) Description() string
Description returns the object's -description text.
func (*HostControllerInterface) Destroy ¶ added in v0.17.0
func (hci *HostControllerInterface) Destroy()
Destroy removes underlying allocations of the IOUSBHostControllerInterface object along with user client When the IOUSBHostControllerInterface is no longer needed, destroy must be called. This will destroy the connection with the user client and de-register interest on the service. If the object is freed, destroy will be called automatically. Calling destroy multiple times has no effect.
func (*HostControllerInterface) GetPortStateMachineForPort ¶ added in v0.17.0
func (hci *HostControllerInterface) GetPortStateMachineForPort(port int) (result *HostCIPortStateMachine, err error)
GetPortStateMachineForPort wraps the corresponding Objective-C method.
func (*HostControllerInterface) InterruptRateHz ¶ added in v0.17.0
func (hci *HostControllerInterface) InterruptRateHz() int
InterruptRateHz returns the interrupt moderation rate for sending interrupt messages to the kernel driver interruptRateHz will cause submitted interrupt messages to be batched together and submitted to the kernel at the specified rate. A value ot 0 will deliver all interrupts to the kernel driver as soon as possible.
func (*HostControllerInterface) IsEqual ¶ added in v0.17.0
func (hci *HostControllerInterface) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostControllerInterface) IsKind ¶ added in v0.17.0
func (hci *HostControllerInterface) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostControllerInterface) Queue ¶ added in v0.17.0
func (hci *HostControllerInterface) Queue() *foundation.Object
Queue returns the dispatch queue for asynchronous operations.
func (*HostControllerInterface) String ¶ added in v0.17.0
func (hci *HostControllerInterface) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HostControllerInterface) UUID ¶ added in v0.17.0
func (hci *HostControllerInterface) UUID() *foundation.UUID
UUID returns a UUID used to identify the host controller interface in this process and the kernel
func (*HostControllerInterface) WithInterruptRateHz ¶ added in v0.17.0
func (hci *HostControllerInterface) WithInterruptRateHz(interruptRateHz int) *HostControllerInterface
WithInterruptRateHz sets the interrupt moderation rate for sending interrupt messages to the kernel driver interruptRateHz will cause submitted interrupt messages to be batched together and submitted to the kernel at the specified rate. A value ot 0 will deliver all interrupts to the kernel driver as soon as possible.
type HostDevice ¶ added in v0.17.0
type HostDevice struct {
HostObject
}
HostDevice is an idiomatic wrapper over the Objective-C class IOUSBHostDevice.
It embeds HostObject, promoting that type's methods.
The class that claims and configures devices, retrieves descriptors, and sends device requests.
func HostDeviceFromID ¶ added in v0.17.0
func HostDeviceFromID(id objc.ID) *HostDevice
HostDeviceFromID adopts an existing Objective-C object as a HostDevice (nil for 0), retaining it and registering a release finalizer.
func NewHostDevice ¶ added in v0.17.0
func NewHostDevice() *HostDevice
NewHostDevice creates a new HostDevice.
func (*HostDevice) ConfigureWithValue ¶ added in v0.17.0
func (hd *HostDevice) ConfigureWithValue(value int) error
ConfigureWithValue selects a new configuration for the device and registers the interfaces for matching.
func (*HostDevice) ConfigureWithValueMatchInterfaces ¶ added in v0.17.0
func (hd *HostDevice) ConfigureWithValueMatchInterfaces(value int, matchInterfaces bool) error
ConfigureWithValueMatchInterfaces selects a new configuration for the device.
func (*HostDevice) Reset ¶ added in v0.17.0
func (hd *HostDevice) Reset() error
Reset terminates the device and attempts to re-enumerate it.
Reset returns an error if the operation did not succeed.
type HostIOSource ¶ added in v0.17.0
HostIOSource is an idiomatic wrapper over the Objective-C class IOUSBHostIOSource.
HostIOSource is an abstract base — you do not construct it directly. Construct one of HostPipe, HostStream and pass it where a HostIOSource is accepted.
This class provides basic functionality for deriving pipe and stream classes.
func HostIOSourceFromID ¶ added in v0.17.0
func HostIOSourceFromID(id objc.ID) *HostIOSource
HostIOSourceFromID adopts an existing Objective-C object as a HostIOSource (nil for 0), retaining it and registering a release finalizer.
func (*HostIOSource) Description ¶ added in v0.17.0
func (his *HostIOSource) Description() string
Description returns the object's -description text.
func (*HostIOSource) DeviceAddress ¶ added in v0.17.0
func (his *HostIOSource) DeviceAddress() int
DeviceAddress returns retrieve the device's address
func (*HostIOSource) EndpointAddress ¶ added in v0.17.0
func (his *HostIOSource) EndpointAddress() int
EndpointAddress returns retrieve the IOSource's endpoint address
func (*HostIOSource) HostInterface ¶ added in v0.17.0
func (his *HostIOSource) HostInterface() *HostInterface
HostInterface returns retrieve the source's IOUSBHostInterface
func (*HostIOSource) IsEqual ¶ added in v0.17.0
func (his *HostIOSource) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostIOSource) IsKind ¶ added in v0.17.0
func (his *HostIOSource) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostIOSource) String ¶ added in v0.17.0
func (his *HostIOSource) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type HostIOSourceProvider ¶ added in v0.17.0
HostIOSourceProvider is accepted wherever a IOUSBHostIOSource (or one of its subclasses) is expected.
type HostInterface ¶ added in v0.17.0
type HostInterface struct {
HostObject
}
HostInterface is an idiomatic wrapper over the Objective-C class IOUSBHostInterface.
It embeds HostObject, promoting that type's methods.
The class for accessing USB-related services.
func HostInterfaceFromID ¶ added in v0.17.0
func HostInterfaceFromID(id objc.ID) *HostInterface
HostInterfaceFromID adopts an existing Objective-C object as a HostInterface (nil for 0), retaining it and registering a release finalizer.
func NewHostInterface ¶ added in v0.17.0
func NewHostInterface() *HostInterface
NewHostInterface creates a new HostInterface.
func (*HostInterface) CopyPipeWithAddress ¶ added in v0.17.0
func (hi *HostInterface) CopyPipeWithAddress(address int) (result *HostPipe, err error)
CopyPipeWithAddress copies a pipe for a specific endpoint address.
func (*HostInterface) IdleTimeout ¶ added in v0.17.0
func (hi *HostInterface) IdleTimeout() float64
IdleTimeout returns retrieve the current idle suspend timeout. See
func (*HostInterface) SelectAlternateSetting ¶ added in v0.17.0
func (hi *HostInterface) SelectAlternateSetting(alternateSetting int) error
SelectAlternateSetting selects an alternative setting for the interface.
func (*HostInterface) SetIdleTimeout ¶ added in v0.17.0
func (hi *HostInterface) SetIdleTimeout(idleTimeout float64) error
SetIdleTimeout sets the desired idle suspend timeout for the interface.
type HostIsochronousTransactionOptions ¶ added in v0.17.0
type HostIsochronousTransactionOptions int64
Bitmask — values may be combined with |.
const ( HostIsochronousTransactionOptionsNone HostIsochronousTransactionOptions = 0 HostIsochronousTransactionOptionsWrap HostIsochronousTransactionOptions = 1 )
func (HostIsochronousTransactionOptions) String ¶ added in v0.17.0
func (e HostIsochronousTransactionOptions) String() string
String returns the HostIsochronousTransactionOptions constant's name, or its numeric form when the value is not a known constant.
type HostIsochronousTransferOptions ¶ added in v0.17.0
type HostIsochronousTransferOptions int64
Bitmask — values may be combined with |.
const (
HostIsochronousTransferOptionsNone HostIsochronousTransferOptions = 0
)
func (HostIsochronousTransferOptions) String ¶ added in v0.17.0
func (e HostIsochronousTransferOptions) String() string
String returns the HostIsochronousTransferOptions constant's name, or its numeric form when the value is not a known constant.
type HostObject ¶ added in v0.17.0
HostObject is an idiomatic wrapper over the Objective-C class IOUSBHostObject.
HostObject is an abstract base — you do not construct it directly. Construct one of HostDevice, HostInterface and pass it where a HostObject is accepted.
This class provides basic functionality for sending device requests and retrieving descriptors.
func HostObjectFromID ¶ added in v0.17.0
func HostObjectFromID(id objc.ID) *HostObject
HostObjectFromID adopts an existing Objective-C object as a HostObject (nil for 0), retaining it and registering a release finalizer.
func (*HostObject) AbortDeviceRequests ¶ added in v0.17.0
func (ho *HostObject) AbortDeviceRequests() error
AbortDeviceRequests aborts device requests synchronously.
AbortDeviceRequests returns an error if the operation did not succeed.
func (*HostObject) AbortDeviceRequestsWithOption ¶ added in v0.17.0
func (ho *HostObject) AbortDeviceRequestsWithOption(option HostAbortOption) error
AbortDeviceRequestsWithOption aborts device requests.
func (*HostObject) CurrentMicroframeWithTime ¶ added in v0.17.0
func (ho *HostObject) CurrentMicroframeWithTime() (result uint64, time_ uint64, err error)
CurrentMicroframeWithTime return the current microframe number of the USB controller This method will return the current microframe number of the USB controller. This is most useful for scheduling future isochronous requests.
func (*HostObject) Description ¶ added in v0.17.0
func (ho *HostObject) Description() string
Description returns the object's -description text.
func (*HostObject) Destroy ¶ added in v0.17.0
func (ho *HostObject) Destroy()
Destroy removes underlying allocations and connections from the USB host object.
func (*HostObject) DestroyWith ¶ added in v0.17.0
func (ho *HostObject) DestroyWith(options HostObjectDestroyOptions)
DestroyWith removes underlying allocations of the IOUSBHostObject object along with user client Extends <code>destroy</code> to take an options to modify the destroy behavior. Currently only the <code>IOUSBHostObjectDestroyOptionsDeviceSurrender</code> is defined to support surrendering ownersip of the kernel service. To be used when accepting the <code>kUSBHostMessageDeviceIsRequestingClose</code> message.
func (*HostObject) DeviceAddress ¶ added in v0.17.0
func (ho *HostObject) DeviceAddress() int
DeviceAddress returns retrieve the current address of the device.
func (*HostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler ¶ added in v0.17.0
func (ho *HostObject) EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler(request unsafe.Pointer, data obj.Object, completionTimeout float64, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueDeviceRequestDataCompletionTimeoutErrorCompletionHandler enqueues a request on the default control endpoint.
func (*HostObject) EnqueueDeviceRequestDataErrorCompletionHandler ¶ added in v0.17.0
func (ho *HostObject) EnqueueDeviceRequestDataErrorCompletionHandler(request unsafe.Pointer, data obj.Object, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueDeviceRequestDataErrorCompletionHandler enqueues a request on the default control endpoint with a default completion timeout.
func (*HostObject) EnqueueDeviceRequestErrorCompletionHandler ¶ added in v0.17.0
func (ho *HostObject) EnqueueDeviceRequestErrorCompletionHandler(request unsafe.Pointer, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueDeviceRequestErrorCompletionHandler enqueues a request on the default control endpoint without a data phase and a default timeout.
func (*HostObject) FrameNumberWithTime ¶ added in v0.17.0
func (ho *HostObject) FrameNumberWithTime() (result uint64, time_ uint64)
FrameNumberWithTime returns the current frame number of the USB controller.
func (*HostObject) IODataWithCapacity ¶ added in v0.17.0
func (ho *HostObject) IODataWithCapacity(capacity int) (result *foundation.MutableData, err error)
IODataWithCapacity allocates a buffer for input/output requests.
func (*HostObject) IOService ¶ added in v0.17.0
func (ho *HostObject) IOService() int
IOService returns retrieve the IOUSBHostObject's io_service_t.
func (*HostObject) IsEqual ¶ added in v0.17.0
func (ho *HostObject) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HostObject) IsKind ¶ added in v0.17.0
func (ho *HostObject) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HostObject) Queue ¶ added in v0.17.0
func (ho *HostObject) Queue() *foundation.Object
Queue returns the dispatch queue that all asynchronous io will be serviced.
func (*HostObject) ReferenceMicroframeWithTime ¶ added in v0.17.0
func (ho *HostObject) ReferenceMicroframeWithTime() (result uint64, time_ uint64, err error)
ReferenceMicroframeWithTime return a recent microframe number of the USB controller This method will return a recent microframe number of the USB controller. This is most useful for scheduling future isochronous requests.
func (*HostObject) SendDeviceRequest ¶ added in v0.17.0
func (ho *HostObject) SendDeviceRequest(request unsafe.Pointer) error
SendDeviceRequest sends a request on the default control endpoint without a data phase and default completion timeout.
func (*HostObject) SendDeviceRequestDataBytesTransferred ¶ added in v0.17.0
func (ho *HostObject) SendDeviceRequestDataBytesTransferred(request unsafe.Pointer, data obj.Object) (bytesTransferred int, err error)
SendDeviceRequestDataBytesTransferred sends a request on the default control endpoint with a default completion timeout.
func (*HostObject) SendDeviceRequestDataBytesTransferredCompletionTimeout ¶ added in v0.17.0
func (ho *HostObject) SendDeviceRequestDataBytesTransferredCompletionTimeout(request unsafe.Pointer, data obj.Object, completionTimeout float64) (bytesTransferred int, err error)
SendDeviceRequestDataBytesTransferredCompletionTimeout sends a request on the default control endpoint.
func (*HostObject) String ¶ added in v0.17.0
func (ho *HostObject) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HostObject) StringWithIndex ¶ added in v0.17.0
func (ho *HostObject) StringWithIndex(index int) (result *foundation.String, err error)
StringWithIndex retrieves an English-language string from a string descriptor.
func (*HostObject) StringWithIndexLanguageID ¶ added in v0.17.0
func (ho *HostObject) StringWithIndexLanguageID(index int, languageID int) (result *foundation.String, err error)
StringWithIndexLanguageID retrieves a string from a string descriptor.
type HostObjectDestroyOptions ¶ added in v0.17.0
type HostObjectDestroyOptions uint64
Bitmask — values may be combined with |.
const ( HostObjectDestroyOptionsNone HostObjectDestroyOptions = 0 HostObjectDestroyOptionsDeviceSurrender HostObjectDestroyOptions = 1 )
func (HostObjectDestroyOptions) String ¶ added in v0.17.0
func (e HostObjectDestroyOptions) String() string
String returns the HostObjectDestroyOptions constant's name, or its numeric form when the value is not a known constant.
type HostObjectInitOptions ¶ added in v0.17.0
type HostObjectInitOptions uint64
Options for initializing the host object. Bitmask — values may be combined with |.
const ( // The default argument for initializing the host object. HostObjectInitOptionsNone HostObjectInitOptions = 0 // The option to capture the device and terminate existing drivers. HostObjectInitOptionsDeviceCapture HostObjectInitOptions = 1 HostObjectInitOptionsDeviceSeize HostObjectInitOptions = 2 )
func (HostObjectInitOptions) String ¶ added in v0.17.0
func (e HostObjectInitOptions) String() string
String returns the HostObjectInitOptions constant's name, or its numeric form when the value is not a known constant.
type HostObjectProvider ¶ added in v0.17.0
HostObjectProvider is accepted wherever a IOUSBHostObject (or one of its subclasses) is expected.
type HostPipe ¶ added in v0.17.0
type HostPipe struct {
HostIOSource
}
HostPipe is an idiomatic wrapper over the Objective-C class IOUSBHostPipe.
It embeds HostIOSource, promoting that type's methods.
The class that sends control, bulk, interrupt, and isochronous input/output requests for function drivers, and manages stream capabilities.
func HostPipeFromID ¶ added in v0.17.0
HostPipeFromID adopts an existing Objective-C object as a HostPipe (nil for 0), retaining it and registering a release finalizer.
func NewHostPipe ¶ added in v0.17.0
func NewHostPipe() *HostPipe
NewHostPipe creates a new HostPipe.
func (*HostPipe) Abort ¶ added in v0.17.0
Abort aborts pending input/output requests synchronously.
Abort returns an error if the operation did not succeed.
func (*HostPipe) AbortWithOption ¶ added in v0.17.0
func (hp *HostPipe) AbortWithOption(option HostAbortOption) error
AbortWithOption aborts pending input/output requests.
func (*HostPipe) ClearStall ¶ added in v0.17.0
ClearStall clears the halt condition of the pipe.
ClearStall returns an error if the operation did not succeed.
func (*HostPipe) CopyStreamWithStreamID ¶ added in v0.17.0
func (hp *HostPipe) CopyStreamWithStreamID(streamID int) (result *HostStream, err error)
CopyStreamWithStreamID returns the stream for a stream ID.
func (*HostPipe) DisableStreams ¶ added in v0.17.0
DisableStreams disables streams for the pipe.
DisableStreams returns an error if the operation did not succeed.
func (*HostPipe) EnableStreams ¶ added in v0.17.0
EnableStreams enables streams for the pipe.
EnableStreams returns an error if the operation did not succeed.
func (*HostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler ¶ added in v0.17.0
func (hp *HostPipe) EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler(request unsafe.Pointer, data obj.Object, completionTimeout float64, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueControlRequestDataCompletionTimeoutErrorCompletionHandler enqueues a request on a control endpoint.
func (*HostPipe) EnqueueControlRequestDataErrorCompletionHandler ¶ added in v0.17.0
func (hp *HostPipe) EnqueueControlRequestDataErrorCompletionHandler(request unsafe.Pointer, data obj.Object, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueControlRequestDataErrorCompletionHandler enqueues a request on a control endpoint with a default completion timeout.
func (*HostPipe) EnqueueControlRequestErrorCompletionHandler ¶ added in v0.17.0
func (hp *HostPipe) EnqueueControlRequestErrorCompletionHandler(request unsafe.Pointer, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueControlRequestErrorCompletionHandler enqueues a request on a control endpoint without a data phase and a default completion timeout.
func (*HostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler ¶ added in v0.17.0
func (hp *HostPipe) EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler(data obj.Object, completionTimeout float64, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueIORequestWithDataCompletionTimeoutErrorCompletionHandler enqueues an input/output request on the pipe.
func (*HostPipe) IdleTimeout ¶ added in v0.17.0
IdleTimeout returns retrieve the current idle suspend timeout. See
func (*HostPipe) SendControlRequest ¶ added in v0.17.0
SendControlRequest sends a request on a control endpoint without a data phase and a default completion timeout.
func (*HostPipe) SendControlRequestDataBytesTransferred ¶ added in v0.17.0
func (hp *HostPipe) SendControlRequestDataBytesTransferred(request unsafe.Pointer, data obj.Object) (bytesTransferred int, err error)
SendControlRequestDataBytesTransferred sends a request on a control endpoint with a default timeout.
func (*HostPipe) SendControlRequestDataBytesTransferredCompletionTimeout ¶ added in v0.17.0
func (hp *HostPipe) SendControlRequestDataBytesTransferredCompletionTimeout(request unsafe.Pointer, data obj.Object, completionTimeout float64) (bytesTransferred int, err error)
SendControlRequestDataBytesTransferredCompletionTimeout sends a request on a control endpoint.
func (*HostPipe) SendIORequestWithDataBytesTransferredCompletionTimeout ¶ added in v0.17.0
func (hp *HostPipe) SendIORequestWithDataBytesTransferredCompletionTimeout(data obj.Object, completionTimeout float64) (bytesTransferred int, err error)
SendIORequestWithDataBytesTransferredCompletionTimeout sends an input/output request on the pipe.
func (*HostPipe) SetIdleTimeout ¶ added in v0.17.0
SetIdleTimeout sets the desired idle suspend timeout for the interface.
type HostStream ¶ added in v0.17.0
type HostStream struct {
HostIOSource
}
HostStream is an idiomatic wrapper over the Objective-C class IOUSBHostStream.
It embeds HostIOSource, promoting that type's methods.
The class responsible for sending stream data for function drivers.
func HostStreamFromID ¶ added in v0.17.0
func HostStreamFromID(id objc.ID) *HostStream
HostStreamFromID adopts an existing Objective-C object as a HostStream (nil for 0), retaining it and registering a release finalizer.
func NewHostStream ¶ added in v0.17.0
func NewHostStream() *HostStream
NewHostStream creates a new HostStream.
func (*HostStream) Abort ¶ added in v0.17.0
func (hs *HostStream) Abort() error
Abort aborts pending input/output requests synchronously.
Abort returns an error if the operation did not succeed.
func (*HostStream) AbortWithOption ¶ added in v0.17.0
func (hs *HostStream) AbortWithOption(option HostAbortOption) error
AbortWithOption aborts pending input/output requests.
func (*HostStream) EnqueueIORequestWithDataErrorCompletionHandler ¶ added in v0.17.0
func (hs *HostStream) EnqueueIORequestWithDataErrorCompletionHandler(data obj.Object, err unsafe.Pointer, completionHandler func(int, uint)) bool
EnqueueIORequestWithDataErrorCompletionHandler enqueues an input/output request on the stream.
func (*HostStream) HostPipe ¶ added in v0.17.0
func (hs *HostStream) HostPipe() *HostPipe
HostPipe returns the IOUSBHostPipe this stream was created from
func (*HostStream) SendIORequestWithDataBytesTransferred ¶ added in v0.17.0
func (hs *HostStream) SendIORequestWithDataBytesTransferred(data obj.Object) (bytesTransferred int, err error)
SendIORequestWithDataBytesTransferred sends an input/output request on the stream.
func (*HostStream) StreamID ¶ added in v0.17.0
func (hs *HostStream) StreamID() int
StreamID returns streamID associated with this IOUSBHostStream.
type IOUSBHostCIMessage ¶
Foundational IOUSBHostControllerInterface message structure used for commands, transfers, and interrupts IOUSBHostCIMessage structures are control structures passed between the IOUSBHostControllerInterface client and the kernel driver. They are used to represent capabilities during initialization, commands and transfers sent from the kernel, and interrupt events sent to the kernel.
type IOUSBHostIOSourceDescriptors ¶
type IOUSBHostIOSourceDescriptors struct {
BcdUSB uint16
Descriptor unsafe.Pointer
SsCompanionDescriptor unsafe.Pointer
SspCompanionDescriptor unsafe.Pointer
}
The descriptors for a single endpoint.
type IOUSBHostIsochronousFrame ¶
type IOUSBHostIsochronousFrame struct {
Status int
RequestCount uint32
CompleteCount uint32
Reserved uint32
TimeStamp uint64
}
A structure that represents a single frame in an isochronous transfer.
type IOUSBHostIsochronousTransaction ¶
type IOUSBHostIsochronousTransaction struct {
Status int
RequestCount uint32
Offset uint32
CompleteCount uint32
TimeStamp uint64
Options HostIsochronousTransactionOptions
}
Structure representing a single frame or microframe in an isochronous transfer.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType int64
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int64
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type MDLabelDomain ¶
type MDLabelDomain int64
These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int64
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int64
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags int64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor int64
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag int64
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags int64
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type Perm ¶ added in v0.17.0
type Perm int64
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int64
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode int64
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags int64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags int64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- IOUSBHostCIControllerStateMachine_generated.go
- IOUSBHostCIDeviceStateMachine_generated.go
- IOUSBHostCIEndpointStateMachine_generated.go
- IOUSBHostCIPortStateMachine_generated.go
- IOUSBHostControllerInterface_generated.go
- IOUSBHostDevice_generated.go
- IOUSBHostIOSource_generated.go
- IOUSBHostInterface_generated.go
- IOUSBHostObject_generated.go
- IOUSBHostPipe_generated.go
- IOUSBHostStream_generated.go
- doc.go
- iousbhost_cfunctions_generated.go
- iousbhost_classmethods_generated.go
- iousbhost_constants_generated.go
- iousbhost_enums_generated.go
- iousbhost_providers_generated.go
- iousbhost_runtime_generated.go
- iousbhost_structs_generated.go