Liking cljdoc? Tell your friends :D

chromex.app.serial

clj

Use the chrome.serial API to read from and write to a device connected to a serial port.

Use the chrome.serial API to read from and write to a device
connected to a serial port.

  * available since Chrome 27
  * https://developer.chrome.com/apps/serial
raw docstring

api-tableclj

source

clear-breakclj/smacro

(clear-break connection-id)

Restore character transmission on a given connection and place the transmission line in a nonbreak state.

|connection-id| - The id of the connection.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-clearBreak.

Restore character transmission on a given connection and place the transmission line in a nonbreak state.

  |connection-id| - The id of the connection.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-clearBreak.
sourceraw docstring

clear-break*cljs

(clear-break* config connection-id)
source

connectclj/smacro

(connect path)
(connect path options)

Connects to a given serial port.

|path| - The system path of the serial port to open. |options| - Port configuration options.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [connection-info] where:

|connection-info| - https://developer.chrome.com/apps/serial#property-callback-connectionInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-connect.

Connects to a given serial port.

  |path| - The system path of the serial port to open.
  |options| - Port configuration options.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [connection-info] where:

  |connection-info| - https://developer.chrome.com/apps/serial#property-callback-connectionInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-connect.
sourceraw docstring

connect*cljs

(connect* config path options)
source

disconnectclj/smacro

(disconnect connection-id)

Disconnects from a serial port.

|connection-id| - The id of the opened connection.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-disconnect.

Disconnects from a serial port.

  |connection-id| - The id of the opened connection.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-disconnect.
sourceraw docstring

disconnect*cljs

(disconnect* config connection-id)
source

flushclj/smacro

(flush connection-id)

Flushes all bytes in the given connection's input and output buffers.

|connection-id| - https://developer.chrome.com/apps/serial#property-flush-connectionId.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-flush.

Flushes all bytes in the given connection's input and output buffers.

  |connection-id| - https://developer.chrome.com/apps/serial#property-flush-connectionId.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-flush.
sourceraw docstring

flush*cljs

(flush* config connection-id)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-connectionsclj/smacro

(get-connections)

Retrieves the list of currently opened serial port connections owned by the application.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [connection-infos] where:

|connection-infos| - https://developer.chrome.com/apps/serial#property-callback-connectionInfos.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getConnections.

Retrieves the list of currently opened serial port connections owned by the application.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [connection-infos] where:

  |connection-infos| - https://developer.chrome.com/apps/serial#property-callback-connectionInfos.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getConnections.
sourceraw docstring

get-connections*cljs

(get-connections* config)
source

get-control-signalsclj/smacro

(get-control-signals connection-id)

Retrieves the state of control signals on a given connection.

|connection-id| - The id of the connection.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [signals] where:

|signals| - https://developer.chrome.com/apps/serial#property-callback-signals.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getControlSignals.

Retrieves the state of control signals on a given connection.

  |connection-id| - The id of the connection.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [signals] where:

  |signals| - https://developer.chrome.com/apps/serial#property-callback-signals.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getControlSignals.
sourceraw docstring

get-control-signals*cljs

(get-control-signals* config connection-id)
source

get-devicesclj/smacro

(get-devices)

Returns information about available serial devices on the system. The list is regenerated each time this method is called.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [ports] where:

|ports| - https://developer.chrome.com/apps/serial#property-callback-ports.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getDevices.

Returns information about available serial devices on the system. The list is regenerated each time this method is called.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [ports] where:

  |ports| - https://developer.chrome.com/apps/serial#property-callback-ports.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getDevices.
sourceraw docstring

get-devices*cljs

(get-devices* config)
source

get-infoclj/smacro

(get-info connection-id)

Retrieves the state of a given connection.

|connection-id| - The id of the opened connection.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [connection-info] where:

|connection-info| - https://developer.chrome.com/apps/serial#property-callback-connectionInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getInfo.

Retrieves the state of a given connection.

  |connection-id| - The id of the opened connection.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [connection-info] where:

  |connection-info| - https://developer.chrome.com/apps/serial#property-callback-connectionInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-getInfo.
sourceraw docstring

get-info*cljs

(get-info* config connection-id)
source

on-receive*cljs

(on-receive* config channel & args)
source

on-receive-error*cljs

(on-receive-error* config channel & args)
source

sendclj/smacro

(send connection-id data)

Writes data to the given connection.

|connection-id| - The id of the connection. |data| - The data to send.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [send-info] where:

|send-info| - https://developer.chrome.com/apps/serial#property-callback-sendInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-send.

Writes data to the given connection.

  |connection-id| - The id of the connection.
  |data| - The data to send.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [send-info] where:

  |send-info| - https://developer.chrome.com/apps/serial#property-callback-sendInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-send.
sourceraw docstring

send*cljs

(send* config connection-id data)
source

set-breakclj/smacro

(set-break connection-id)

Suspends character transmission on a given connection and places the transmission line in a break state until the clearBreak is called.

|connection-id| - The id of the connection.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-setBreak.

Suspends character transmission on a given connection and places the transmission line in a break state until the
clearBreak is called.

  |connection-id| - The id of the connection.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-setBreak.
sourceraw docstring

set-break*cljs

(set-break* config connection-id)
source

set-control-signalsclj/smacro

(set-control-signals connection-id signals)

Sets the state of control signals on a given connection.

|connection-id| - The id of the connection. |signals| - The set of signal changes to send to the device.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-setControlSignals.

Sets the state of control signals on a given connection.

  |connection-id| - The id of the connection.
  |signals| - The set of signal changes to send to the device.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-setControlSignals.
sourceraw docstring

set-control-signals*cljs

(set-control-signals* config connection-id signals)
source

set-pausedclj/smacro

(set-paused connection-id paused)

Pauses or unpauses an open connection.

|connection-id| - The id of the opened connection. |paused| - Flag to indicate whether to pause or unpause.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-setPaused.

Pauses or unpauses an open connection.

  |connection-id| - The id of the opened connection.
  |paused| - Flag to indicate whether to pause or unpause.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-setPaused.
sourceraw docstring

set-paused*cljs

(set-paused* config connection-id paused)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.app.serial namespace.

Taps all valid non-deprecated events in chromex.app.serial namespace.
sourceraw docstring

tap-on-receive-error-eventsclj/smacro

(tap-on-receive-error-events channel & args)

Event raised when an error occurred while the runtime was waiting for data on the serial port. Once this event is raised, the connection may be set to paused. A 'timeout' error does not pause the connection.

Events will be put on the |channel| with signature [::on-receive-error [info]] where:

|info| - https://developer.chrome.com/apps/serial#property-onReceiveError-info.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/serial#event-onReceiveError.

Event raised when an error occurred while the runtime was waiting for data on the serial port. Once this event is raised,
the connection may be set to paused. A 'timeout' error does not pause the connection.

Events will be put on the |channel| with signature [::on-receive-error [info]] where:

  |info| - https://developer.chrome.com/apps/serial#property-onReceiveError-info.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/serial#event-onReceiveError.
sourceraw docstring

tap-on-receive-eventsclj/smacro

(tap-on-receive-events channel & args)

Event raised when data has been read from the connection.

Events will be put on the |channel| with signature [::on-receive [info]] where:

|info| - Event data.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/serial#event-onReceive.

Event raised when data has been read from the connection.

Events will be put on the |channel| with signature [::on-receive [info]] where:

  |info| - Event data.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/serial#event-onReceive.
sourceraw docstring

updateclj/smacro

(update connection-id options)

Update the option settings on an open serial port connection.

|connection-id| - The id of the opened connection. |options| - Port configuration options.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-update.

Update the option settings on an open serial port connection.

  |connection-id| - The id of the opened connection.
  |options| - Port configuration options.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/serial#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/serial#method-update.
sourceraw docstring

update*cljs

(update* config connection-id options)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close