forked from scchn/swift-zpl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSelectEncodingTable.swift
More file actions
34 lines (31 loc) · 917 Bytes
/
Copy pathSelectEncodingTable.swift
File metadata and controls
34 lines (31 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// SelectEncodingTable.swift
//
//
// Created by chen on 2023/11/11.
//
import Foundation
/// The ^SE command is used to select the desired ZPL or ZPL II encoding table.
///
/// # Select Encoding Table
public struct SelectEncodingTable: ZPLCommandConvertible {
/// Location of encoding table
public var deviceLocation: DeviceLocation
/// Name of encoding table
///
/// Values: 1 to 8 alphanumeric characters
/// * `tableName`.DAT
public var tableName: String
public var command: String {
"^SE\(deviceLocation.rawValue):\(tableName).DAT"
}
/// Select Encoding Table.
///
/// - Parameters:
/// - deviceLocation: Location of encoding table.
/// - tableName: Name of encoding table.
public init(deviceLocation: DeviceLocation, tableName: String) {
self.deviceLocation = deviceLocation
self.tableName = tableName
}
}