System Console and Toolkit Tcl Command Reference Manual

ID 683101
Date 4/01/2024
Public
Document Table of Contents

1.1.131. monitor_read_all_data

Description

Returns a list of list of 8-bit values read from all recent values read from device since last TCL callback. The memory range specified must be within the monitored memory range as defined by monitor_add_range.

Usage

monitor_read_all_data <service-path> <target path> <address> <size>

ReturnType

String[]

Returns

Arguments

service-path
target path
address
Specifies the location on which the memory is read.
size
Specifies the number of bytes to be monitored starting from the address specified.

Example

#
# Get monitor service
#
set service_path [get_service_paths monitor]

#
# Claim a monitor service
#
set monitor_path [claim_service monitor $service_path "my_lib" ""]

# Assume there is one device and one master
set master_path [lindex [get_service_paths master] 0]

#
# Define monitor service properties
#
monitor_set_interval $monitor_path 1000

monitor_set_callback $monitor_path [list example_callback_proc $monitor_path $master_path]

monitor_add_range $monitor_path $master_path 0x00 4
monitor_add_range $monitor_path $master_path 0x10 4

#TCL callback procedure for the monitor service
proc example_callback_proc {monitor_path master_path} {
	set w1 [monitor_read_data $monitor_path $master_path 0x00 4]
	set w2 [monitor_read_data $monitor_path $master_path 0x10 4]
	set i1 [monitor_get_read_interval $monitor_path $master_path 0x00 4]
	set i2 [monitor_get_read_interval $monitor_path $master_path 0x10 4]

	puts "0x00-0x03: $w1 ($i1 ms)"
	puts "0x10-0x13: $w2 ($i2 ms)"
}

#
# Activate the monitor service
#

monitor_set_enabled $monitor_path 1