Tiny IIO Daemon Library

Dependents:  

tinyiiod-private.h

Committer:
mahphalke
Date:
11 months ago
Revision:
2:2119a523fbbc
Parent:
1:6cb62c8c58d6

File content as of revision 2:2119a523fbbc:

/***************************************************************************//**
 *   @file    tinyiiod-private.h
 *   @brief   Tiny IIO Daemon Library private defines
 *   @author  Paul Cercueil <paul.cercueil@analog.com>
********************************************************************************
 * Copyright (c) 2016, 2020 Analog Devices, Inc.
 *
 * All rights reserved.
 *
 * This software is proprietary to Analog Devices, Inc. and its licensors.
 * By using this software you agree to the terms of the associated
 * Analog Devices Software License Agreement.
*******************************************************************************/

#ifndef TINYIIOD_PRIVATE_H
#define TINYIIOD_PRIVATE_H

#include "tinyiiod.h"

char tinyiiod_read_char(struct tinyiiod *iiod);
ssize_t tinyiiod_read(struct tinyiiod *iiod, char *buf, size_t len);
ssize_t tinyiiod_read_line(struct tinyiiod *iiod, char *buf, size_t len);

ssize_t tinyiiod_write_char(struct tinyiiod *iiod, char c);
ssize_t tinyiiod_write(struct tinyiiod *iiod, const char *data, size_t len);
ssize_t tinyiiod_write_string(struct tinyiiod *iiod, const char *str);
ssize_t tinyiiod_write_value(struct tinyiiod *iiod, int32_t value);

void tinyiiod_write_xml(struct tinyiiod *iiod);

void tinyiiod_do_read_attr(struct tinyiiod *iiod, const char *device,
			   const char *channel, bool ch_out, const char *attr, bool debug);

void tinyiiod_do_write_attr(struct tinyiiod *iiod, const char *device,
			    const char *channel, bool ch_out, const char *attr,
			    size_t bytes, bool debug);

void tinyiiod_do_open(struct tinyiiod *iiod, const char *device,
		      size_t sample_size, uint32_t mask);
void tinyiiod_do_close(struct tinyiiod *iiod, const char *device);

int32_t tinyiiod_do_open_instance(struct tinyiiod *iiod);

int32_t tinyiiod_do_close_instance(struct tinyiiod *iiod);

int32_t tinyiiod_do_readbuf(struct tinyiiod *iiod,
			    const char *device, size_t bytes_count);

int32_t tinyiiod_do_writebuf(struct tinyiiod *iiod, const char *device,
			     size_t bytes_count);

int32_t tinyiiod_parse_string(struct tinyiiod *iiod, char *str);

int32_t tinyiiod_set_timeout(struct tinyiiod *iiod, uint32_t timeout);

#endif /* TINYIIOD_PRIVATE_H */