- Core
- Overview
- Summary
- Files
- Data Structures
- Macros
- Typedefs
- Enumerations
- Functions
- Details
- Macro Definition Documentation
- HDF_INIT
- Typedef Documentation
- OnEventReceived
- Enumeration Type Documentation
- DevicePreload
- ServicePolicy
- Function Documentation
- DevSvcManagerClntGetService()
- HdfDeviceGetServiceName()
- HdfDeviceRegisterEventListener()
- HdfDeviceSendEvent()
- HdfDeviceSendEventToClient()
- HdfDeviceSubscribeService()
- HdfDeviceUnregisterEventListener()
- HdfIoServiceBind()
- HdfIoServiceRecycle()
- HdfSBufBind()
- HdfSBufCopy()
- HdfSbufFlush()
- HdfSbufGetCapacity()
- HdfSbufGetData()
- HdfSbufGetDataSize()
- HdfSBufMove()
- HdfSBufObtain()
- HdfSBufObtainDefaultSize()
- HdfSbufReadBuffer()
- HdfSbufReadInt16()
- HdfSbufReadInt32()
- HdfSbufReadInt64()
- HdfSbufReadInt8()
- HdfSbufReadString()
- HdfSbufReadUint16()
- HdfSbufReadUint32()
- HdfSbufReadUint64()
- HdfSbufReadUint8()
- HdfSBufRecycle()
- HdfSbufTransDataOwnership()
- HdfSbufWriteBuffer()
- HdfSbufWriteInt16()
- HdfSbufWriteInt32()
- HdfSbufWriteInt64()
- HdfSbufWriteInt8()
- HdfSbufWriteString()
- HdfSbufWriteUint16()
- HdfSbufWriteUint32()
- HdfSbufWriteUint64()
- HdfSbufWriteUint8()
Core
Overview
Provides OpenHarmony Driver Foundation (HDF) APIs.
The HDF implements driver framework capabilities such as driver loading, service management, and driver message model. You can develop drivers based on the HDF.
Since:
1.0
Summary
Files
Declares functions related to driver loading, service obtaining, and power management. |
|
Declares the structures defining driver service objects and event listeners, as well as the functions for obtaining a driver service object, dispatching a driver service call, and registering or unregistering an event listener. |
|
Declares the base object provided by the HDF for the driver. |
|
Defines functions related to a HdfSBuf. The HDF provides data serialization and deserialization capabilities for data transmission between user-mode applications and kernel-mode drivers. |
Data Structures
Defines the power management functions provided by the HDF for the driver. |
|
Defines a HdfSBuf. |
Macros
HDF_INIT(module) HDF_DRIVER_INIT(module) |
Typedefs
OnEventReceived) (void priv, uint32_t id, struct HdfSBuf data) |
Enumerations
ServicePolicy { SERVICE_POLICY_NONE = 0, SERVICE_POLICY_PUBLIC, SERVICE_POLICY_CAPACITY, SERVICE_POLICY_FRIENDLY, SERVICE_POLICY_PRIVATE, SERVICE_POLICY_INVALID } |
Enumerates policies for releasing driver services developed based on the HDF. |
DevicePreload { DEVICE_PRELOAD_ENABLE = 0, DEVICE_PRELOAD_DISABLE, DEVICE_PRELOAD_INVALID } |
Functions
DevSvcManagerClntGetService (const char svcName) |
const struct HdfObject Obtains the driver service object based on a driver service name. |
HdfDeviceGetServiceName (const struct HdfDeviceObject deviceObject) |
|
HdfDeviceSubscribeService (struct HdfDeviceObject deviceObject, const char serviceName, struct SubscriberCallback callback) |
|
HdfDeviceSendEvent (const struct HdfDeviceObject deviceObject, uint32_t id, const struct HdfSBuf data) |
|
HdfDeviceSendEventToClient (const struct HdfDeviceIoClient client, uint32_t id, const struct HdfSBuf data) |
|
HdfIoServiceBind (const char serviceName, mode_t permission) |
struct HdfIoService |
HdfIoServiceRecycle (struct HdfIoService service) |
Destroys a specified driver service object to release resources if it is no longer required. |
HdfDeviceRegisterEventListener (struct HdfIoService target, struct HdfDevEventlistener listener) |
Registers a custom HdfDevEventlistener for listening for events reported by a specified driver service object. |
HdfDeviceUnregisterEventListener (struct HdfIoService target, struct HdfDevEventlistener listener) |
Unregisters a previously registered HdfDevEventlistener to release resources if it is no longer required. |
HdfSbufWriteBuffer (struct HdfSBuf sbuf, const void data, uint32_t writeSize) |
|
HdfSbufWriteUint64 (struct HdfSBuf sbuf, uint64_t value) |
|
HdfSbufWriteUint32 (struct HdfSBuf sbuf, uint32_t value) |
|
HdfSbufWriteUint16 (struct HdfSBuf sbuf, uint16_t value) |
|
HdfSbufWriteUint8 (struct HdfSBuf sbuf, uint8_t value) |
|
HdfSbufWriteInt64 (struct HdfSBuf sbuf, int64_t value) |
|
HdfSbufWriteInt32 (struct HdfSBuf sbuf, int32_t value) |
|
HdfSbufWriteInt16 (struct HdfSBuf sbuf, int16_t value) |
|
HdfSbufWriteInt8 (struct HdfSBuf sbuf, int8_t value) |
|
HdfSbufWriteString (struct HdfSBuf sbuf, const char value) |
|
HdfSbufReadBuffer (struct HdfSBuf sbuf, const void *data, uint32_t readSize) |
|
HdfSbufReadUint64 (struct HdfSBuf sbuf, uint64_t value) |
|
HdfSbufReadUint32 (struct HdfSBuf sbuf, uint32_t value) |
|
HdfSbufReadUint16 (struct HdfSBuf sbuf, uint16_t value) |
|
HdfSbufReadUint8 (struct HdfSBuf sbuf, uint8_t value) |
|
HdfSbufReadInt64 (struct HdfSBuf sbuf, int64_t value) |
|
HdfSbufReadInt32 (struct HdfSBuf sbuf, int32_t value) |
|
HdfSbufReadInt16 (struct HdfSBuf sbuf, int16_t value) |
|
HdfSbufReadInt8 (struct HdfSBuf sbuf, int8_t value) |
|
HdfSbufReadString (struct HdfSBuf sbuf) |
|
HdfSbufGetData (const struct HdfSBuf sbuf) |
|
HdfSbufFlush (struct HdfSBuf sbuf) |
|
HdfSbufGetCapacity (const struct HdfSBuf sbuf) |
|
HdfSbufGetDataSize (const struct HdfSBuf sbuf) |
|
HdfSBufObtain (size_t capacity) |
struct HdfSBuf |
HdfSBufObtainDefaultSize (void) |
struct HdfSBuf Obtains a SBuf instance of the default capacity (256 bytes). |
HdfSBufBind (uintptr_t base, size_t size) |
struct HdfSBuf Creates a SBuf instance with the specified data and size. The pointer to the data stored in the SBuf is released by the caller, and the written data size should not exceed the specified value of size. |
HdfSBufRecycle (struct HdfSBuf sbuf) |
|
HdfSBufMove (struct HdfSBuf sbuf) |
struct HdfSBuf Creates a SBuf instance with an original SBuf. This function moves the data stored in the original SBuf to the new one without memory copy. |
HdfSBufCopy (const struct HdfSBuf sbuf) |
struct HdfSBuf Creates a SBuf instance with an original SBuf. This function copies the data stored in the original SBuf to the new one. |
HdfSbufTransDataOwnership (struct HdfSBuf sbuf) |
Transfers the data ownership to a SBuf. Once the SBuf is released, the bound data memory is also released. This function is used together with HdfSBufBind. |
Details
Macro Definition Documentation
HDF_INIT
#define HDF_INIT( module) HDF_DRIVER_INIT(module)
Description:
Registers the driver with the HDF.
For a driver developed based on the HDF, HDF_INIT must be used to register an entry with the HDF, and the registered object must be of the HdfDriverEntry type.
Parameters:
module | Indicates the global variable of the HdfDriverEntry type |
Typedef Documentation
OnEventReceived
typedef int(* OnEventReceived) (void *priv, uint32_t id, struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) *data)
Description:
Called when a driver event occurs.
You can implement this function and bind it to the custom HdfDevEventlistener object.
Parameters:
priv | Indicates the pointer to the private data bound to this listener. |
id | Indicates the serial number of the driver event occurred. |
data | Indicates the pointer to the content data of the driver event. |
Returns:
Returns 0 if the operation is successful; returns a negative value otherwise.
Enumeration Type Documentation
DevicePreload
enum [DevicePreload]($api-api-SmartVision-Devices-Core.md#ga0f3d81b5ff5d3896f7d8cf15f76b451e)
Description:
Enumerates driver loading policies.
If a driver developed based on the HDF needs to use the on-demand loading mechanism in the HDF, the PRELOAD field must be correctly set in the driver configuration information to control the driver loading mode.
DEVICE_PRELOAD_ENABLE | |
DEVICE_PRELOAD_DISABLE | |
DEVICE_PRELOAD_INVALID |
ServicePolicy
enum [ServicePolicy]($api-api-SmartVision-Devices-Core.md#ga172844da8a6908bf7226eee703ad9f80)
Description:
Enumerates policies for releasing driver services developed based on the HDF.
If a driver is developed based on the HDF and uses the service management feature of the HDF, you need to configure the policy for releasing services to external systems.
Function Documentation
DevSvcManagerClntGetService()
const struct [HdfObject]($api-api-SmartVision-Devices-HdfObject.md)* DevSvcManagerClntGetService (const char * svcName)
Description:
Obtains the driver service object based on a driver service name.
Parameters:
serviceName | Indicates the pointer to the released driver service name. |
Returns:
Returns the driver service object if the operation is successful; returns NULL otherwise.
HdfDeviceGetServiceName()
const char* HdfDeviceGetServiceName (const struct [HdfDeviceObject]($api-api-SmartVision-Devices-HdfDeviceObject.md) * deviceObject)
Description:
Obtains the service name of a driver.
If a driver does not save its service name, it can use this function to obtain the service name.
Parameters:
deviceObject | Indicates the pointer to the driver device object. |
Returns:
Returns the service name if the operation is successful; returns NULL otherwise.
HdfDeviceRegisterEventListener()
int HdfDeviceRegisterEventListener (struct [HdfIoService]($api-api-SmartVision-Devices-HdfIoService.md) * target, struct [HdfDevEventlistener]($api-api-SmartVision-Devices-HdfDevEventlistener.md) * listener )
Description:
Registers a custom HdfDevEventlistener for listening for events reported by a specified driver service object.
Parameters:
target | Indicates the pointer to the driver service object to listen, which is obtained through the HdfIoServiceBind function. |
listener | Indicates the pointer to the listener to register. |
Returns:
Returns 0 if the operation is successful; returns a negative value otherwise.
HdfDeviceSendEvent()
int32_t HdfDeviceSendEvent (const struct [HdfDeviceObject]($api-api-SmartVision-Devices-HdfDeviceObject.md) * deviceObject, uint32_t id, const struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * data )
Description:
Sends event messages.
When the driver service invokes this function to send a message, all user-level applications that have registered listeners through HdfDeviceRegisterEventListener will receive the message.
Parameters:
deviceObject | Indicates the pointer to the driver device object. |
id | Indicates the ID of the message sending event. |
data | Indicates the pointer to the message content sent by the driver. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
HdfDeviceSendEventToClient()
int32_t HdfDeviceSendEventToClient (const struct [HdfDeviceIoClient]($api-api-SmartVision-Devices-HdfDeviceIoClient.md) * client, uint32_t id, const struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * data )
Description:
Sends an event message to a specified client object.
When the driver service invokes this function to send a message, the user-level applications that have registered listeners through HdfDeviceRegisterEventListener and correspond to this client object will receive the message.
Parameters:
client | Indicates the pointer to the client object of the driver service. |
id | Indicates the ID of the message sending event. |
data | Indicates the pointer to the message content sent by the driver. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
HdfDeviceSubscribeService()
int32_t HdfDeviceSubscribeService (struct [HdfDeviceObject]($api-api-SmartVision-Devices-HdfDeviceObject.md) * deviceObject, const char * serviceName, struct [SubscriberCallback]($api-api-SmartVision-Devices-SubscriberCallback.md) callback )
Description:
Subscribes to a driver service.
If the driver loading time is not perceived, this function can be used to subscribe to the driver service. (The driver service and the subscriber must be on the same host.) After the subscribed-to driver service is loaded by the HDF, the framework proactively releases the service interface to the subscriber.
Parameters:
deviceObject | Indicates the pointer to the driver device object of the subscriber. |
serviceName | Indicates the pointer to the driver service name. |
callback | Indicates the callback invoked by the HDF after the subscribed-to driver service is loaded. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
HdfDeviceUnregisterEventListener()
int HdfDeviceUnregisterEventListener (struct [HdfIoService]($api-api-SmartVision-Devices-HdfIoService.md) * target, struct [HdfDevEventlistener]($api-api-SmartVision-Devices-HdfDevEventlistener.md) * listener )
Description:
Unregisters a previously registered HdfDevEventlistener to release resources if it is no longer required.
Parameters:
target | Indicates the pointer to the driver service object that has been listened. |
listener | Indicates the listener object registered by HdfDeviceRegisterEventListener. |
Returns:
Returns 0 if the operation is successful; returns a negative value otherwise.
HdfIoServiceBind()
struct [HdfIoService]($api-api-SmartVision-Devices-HdfIoService.md)* HdfIoServiceBind (const char * serviceName, mode_t permission )
Description:
Obtains a driver service object.
Parameters:
Returns:
Returns the pointer to the driver service object if the operation is successful; returns NULL otherwise.
HdfIoServiceRecycle()
void HdfIoServiceRecycle (struct [HdfIoService]($api-api-SmartVision-Devices-HdfIoService.md) * service)
Description:
Destroys a specified driver service object to release resources if it is no longer required.
Parameters:
service | Indicates the pointer to the driver service object to destroy. |
HdfSBufBind()
struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md)* HdfSBufBind (uintptr_t base, size_t size )
Description:
Creates a SBuf instance with the specified data and size. The pointer to the data stored in the SBuf is released by the caller, and the written data size should not exceed the specified value of size.
Parameters:
base | Indicates the base of the data to use. |
size | Indicates the size of the data to use. |
Returns:
Returns the SBuf instance.
HdfSBufCopy()
struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md)* HdfSBufCopy (const struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Creates a SBuf instance with an original SBuf. This function copies the data stored in the original SBuf to the new one.
Parameters:
sbuf | Indicates the pointer to the original SBuf. |
Returns:
Returns the new SBuf instance.
HdfSbufFlush()
void HdfSbufFlush (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Clears the data stored in a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
HdfSbufGetCapacity()
size_t HdfSbufGetCapacity (const struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Obtains the capacity of a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
Returns:
Returns the SBuf capacity.
HdfSbufGetData()
uint8_t* HdfSbufGetData (const struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Obtains the pointer to the data stored in aSBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
Returns:
Returns the pointer to the data stored in the target SBuf.
HdfSbufGetDataSize()
size_t HdfSbufGetDataSize (const struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Obtains the size of the data stored in a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
Returns:
Returns the data size.
HdfSBufMove()
struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md)* HdfSBufMove (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Creates a SBuf instance with an original SBuf. This function moves the data stored in the original SBuf to the new one without memory copy.
Parameters:
sbuf | Indicates the pointer to the original SBuf. |
Returns:
Returns the new SBuf instance.
HdfSBufObtain()
struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md)* HdfSBufObtain (size_t capacity)
Description:
Obtains a SBuf instance.
Parameters:
capacity | Indicates the initial capacity of theSBuf. |
Returns:
Returns the SBuf instance.
HdfSBufObtainDefaultSize()
struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md)* HdfSBufObtainDefaultSize (void )
Description:
Obtains a SBuf instance of the default capacity (256 bytes).
Returns:
Returns the SBuf instance.
HdfSbufReadBuffer()
bool HdfSbufReadBuffer (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, const void ** data, uint32_t * readSize )
Description:
Reads a data segment from a SBuf.
Parameters:
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadInt16()
bool HdfSbufReadInt16 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int16_t * value )
Description:
Reads a 16-bit signed integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 16-bit signed integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadInt32()
bool HdfSbufReadInt32 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int32_t * value )
Description:
Reads a 32-bit signed integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 32-bit signed integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadInt64()
bool HdfSbufReadInt64 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int64_t * value )
Description:
Reads a 64-bit signed integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 64-bit signed integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadInt8()
bool HdfSbufReadInt8 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int8_t * value )
Description:
Reads an 8-bit signed integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 8-bit signed integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadString()
const char* HdfSbufReadString (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Reads a string from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
Returns:
Returns the pointer to the string read if the operation is successful; returns NULL otherwise. The memory pointed to by this pointer is managed by the SBuf and they share the same lifecycle.
HdfSbufReadUint16()
bool HdfSbufReadUint16 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint16_t * value )
Description:
Reads a 16-bit unsigned integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 16-bit unsigned integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadUint32()
bool HdfSbufReadUint32 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint32_t * value )
Description:
Reads a 32-bit unsigned integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 32-bit unsigned integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadUint64()
bool HdfSbufReadUint64 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint64_t * value )
Description:
Reads a 64-bit unsigned integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 64-bit unsigned integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufReadUint8()
bool HdfSbufReadUint8 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint8_t * value )
Description:
Reads an 8-bit unsigned integer from a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the 8-bit unsigned integer read, which is requested by the caller. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSBufRecycle()
void HdfSBufRecycle (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Releases a SBuf .
Parameters:
sbuf | Indicates the pointer to the SBuf to release. |
HdfSbufTransDataOwnership()
void HdfSbufTransDataOwnership (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf)
Description:
Transfers the data ownership to a SBuf. Once the SBuf is released, the bound data memory is also released. This function is used together with HdfSBufBind.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
HdfSbufWriteBuffer()
bool HdfSbufWriteBuffer (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, const void * data, uint32_t writeSize )
Description:
Writes a data segment to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
data | Indicates the pointer to the data segment to write. |
writeSize | Indicates the size of the data segment to write. The maximum value is 512 KB. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteInt16()
bool HdfSbufWriteInt16 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int16_t value )
Description:
Writes a 16-bit signed integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 16-bit signed integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteInt32()
bool HdfSbufWriteInt32 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int32_t value )
Description:
Writes a 32-bit signed integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 32-bit signed integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteInt64()
bool HdfSbufWriteInt64 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int64_t value )
Description:
Writes a 64-bit signed integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 64-bit signed integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteInt8()
bool HdfSbufWriteInt8 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, int8_t value )
Description:
Writes an 8-bit signed integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 8-bit signed integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteString()
bool HdfSbufWriteString (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, const char * value )
Description:
Writes a string to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the pointer to the string to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteUint16()
bool HdfSbufWriteUint16 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint16_t value )
Description:
Writes a 16-bit unsigned integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 16-bit unsigned integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteUint32()
bool HdfSbufWriteUint32 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint32_t value )
Description:
Writes a 32-bit unsigned integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 32-bit unsigned integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteUint64()
bool HdfSbufWriteUint64 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint64_t value )
Description:
Writes a 64-bit unsigned integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 64-bit unsigned integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.
HdfSbufWriteUint8()
bool HdfSbufWriteUint8 (struct [HdfSBuf]($api-api-SmartVision-Devices-HdfSBuf.md) * sbuf, uint8_t value )
Description:
Writes an 8-bit unsigned integer to a SBuf.
Parameters:
sbuf | Indicates the pointer to the target SBuf. |
value | Indicates the 8-bit unsigned integer to write. |
Returns:
Returns true if the operation is successful; returns false otherwise.