# ck update logreplay

Updates an existing Log Replay node in the current measurement setup.

## Synopsis

```text
ck update logreplay
    <LOGREPLAY_NAME_OR_ID>
    [--url <String>]
    [--api-key <String>]
    [--language <en|zh|ja>]
    [-n|--name <NODE_NAME>]
    [-p|--path <LOG_FILE_PATH>]
    [-i|--iterations <NUMBER_OF_ITERATIONS>]
    [-s|--samplerate <SAMPLE_RATE_MS>]
    [-t|--transceiver-mode <Rx|Tx|RxAndTx>]
    [--include-error-frames <True|False>]
    [-m|--send-first-message-mode <Directly|AtTimestamp|AfterOffset>]
    [-o|--time-offset <TIME_OFFSET_MS>]
    [--time-factor <TIME_FACTOR>]
    [--decrease-speed <True|False>]
    [--channel-mappings <CHANNEL_MAPPINGS_JSON>]

ck update logreplay -h|--help
```

## Arguments

- ```LOGREPLAY_NAME_OR_ID```  
The name or identifier of the Log Replay node to update.

## Options

- ```--url```  
Specify the URL of the CanKingService if connecting to a remote host. Falls back to the CANKING_REMOTE_URL environment variable. If not specified, the command will connect to a local CanKingService instance.

- ```--api-key```  
API key required when connecting to a remote CanKingService instance. Falls back to the CANKING_REMOTE_API_KEY environment variable.

- ```--language```  
Specify the preferred language to be used in all output strings. Default value is English (en). Supported languages are English (en), Chinese (zh), and Japanese (ja).

- ```-n|--name```  
New name for the node.

- ```-p|--path```  
Full path to the log file to read CAN frames from.

- ```-i|--iterations```  
Number of iterations to loop the log file. Set to -1 to keep looping indefinitely.

- ```-s|--samplerate```  
Static sample rate in milliseconds to send the CAN frames at. If zero, timestamps from the log file will be used.

- ```-t|--transceiver-mode```  
If only Rx, Tx, or both Rx and Tx messages shall be replayed.

- ```--include-error-frames```  
Replay error frames as well.

- ```-m|--send-first-message-mode```  
Send the first message straight away, at the timestamp specified in the log file or after an offset.

- ```-o|--time-offset```  
Time offset in milliseconds until sending the first message.

- ```--time-factor```  
Factor in percentage for speeding up or down the waiting time until sending the next message.

- ```--decrease-speed```  
Decrease the speed by the time factor. By default, the speed will be increased.

- ```--channel-mappings```  
JSON string mapping a channel found in the log file to the channel identifier to be used when replaying the file. Example: '{"1":"abc1-def2-ghi3-4567j"}'

## Examples

```bash
ck update logreplay "Log Replay" --iterations 5
ck update logreplay "Log Replay" --path full/path/to/newfile.log
ck update logreplay 1875f340-a9c4-4d5b-993c-b08ce4bdfca2 --samplerate 100 --time-factor 1.5
```

