CAPS Universe documentation  1.0.4
All you need to know to be successful
samsung-spl2-header.h
Go to the documentation of this file.
1#pragma once
2/*
3 * (c) 2019 Juergen Borleis <projects@caps-printing.org>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
8 * any later version.
9 */
10
15#include <stdint.h>
16#include <libcapsbase.h>
17
50};
51/*
52Bond paper
53This type of paper is stronger and more durable than the average sheet of paper. Instead of being made from low grade wood pulp, it is mostly made up of rag pulp.
54It’s perfect for letterheads, typed reports and envelopes.
55*/
56
65};
66
67/* Some known record types, the printer understands */
71 JOB_TERMINATE = 0x9, /* Terminate current job and return into PJL Mode */
72 BAND_RECORD = 0x0c,
73};
74
80#undef INCLUDE_HEADER_MARKER
81
88#ifdef INCLUDE_HEADER_MARKER
89 char header[13];
90#endif
91 uint8_t record;
92 uint8_t yres;
93 uint16_t copies;
94 uint8_t ptype;
95 uint16_t pwidth;
96 uint16_t plength;
97 uint8_t pfeed;
98 uint8_t dummy1;
99 uint8_t duplex;
100 uint8_t tumble;
101 uint8_t dummy2;
102 uint8_t ver;
103 uint8_t dummy3;
104 uint8_t xres;
105} __packed;
106
113#ifdef INCLUDE_HEADER_MARKER
114 char header[13];
115#endif
116 uint8_t record;
117 uint16_t copies;
118} __packed;
119
126#ifdef INCLUDE_HEADER_MARKER
127 char header[13];
128#endif
129 uint8_t record;
130 uint8_t number;
131 uint16_t width;
132 uint16_t height;
133 uint8_t compr;
134 uint32_t length;
135} __packed;
136
138#define TABLE_PTR_SIZE 0x40
139
146#define COMP_DATA_HEADER_MARKER 0x09ABCDEF
147
152#define LINES_IN_ONE_BAND 128
153
155#define COMPRESS_SAMPLE_RATE 0x800
156
161#define MAX_UNCOMPRESSED_BYTES 0x80
162
164#define MIN_COMPRESSED_BYTES 0x2
165
167#define COMPRESS_ENTRY_SIZE 0x2
168
170#define RAW_ENTRY_SIZE 0x2
171
173#define MAX_COMPRESSED_BYTES 0x202
174
187#ifdef INCLUDE_HEADER_MARKER
188 char header[13];
189#endif
190 uint32_t marker;
193 uint8_t raw_data[0];
194 /* here follows the compressed data */
195} __packed;
#define __packed
Definition: libcapsbase.h:103
Basic API for everything else of the CAPS universe.
paper_feed
Definition: samsung-spl2-header.h:57
@ SPL_AUTO_FEED
Definition: samsung-spl2-header.h:58
@ SPL_BOTTOM_FEED
Definition: samsung-spl2-header.h:62
@ SPL_THIRD_FEED
Definition: samsung-spl2-header.h:64
@ SPL_MANUAL_FEED
Definition: samsung-spl2-header.h:59
@ SPL_ENVELOPES_FEED
Definition: samsung-spl2-header.h:63
@ SPL_MULTI_FEED
Definition: samsung-spl2-header.h:60
@ SPL_TOP_FEED
Definition: samsung-spl2-header.h:61
record_type
Definition: samsung-spl2-header.h:68
@ PAGE_HEADER_RECORD
Definition: samsung-spl2-header.h:69
@ PAGE_FOOTER_RECORD
Definition: samsung-spl2-header.h:70
@ JOB_TERMINATE
Definition: samsung-spl2-header.h:71
@ BAND_RECORD
Definition: samsung-spl2-header.h:72
#define TABLE_PTR_SIZE
Definition: samsung-spl2-header.h:138
format_type
The media format types to be sent in the page header's 'ptype' member.
Definition: samsung-spl2-header.h:28
@ SPL_EXECUTIVE_TYPE
Definition: samsung-spl2-header.h:32
@ SPL_JISB6_TYPE
Definition: samsung-spl2-header.h:46
@ SPL_DINA4_TYPE
Definition: samsung-spl2-header.h:31
@ SPL_DINA3_TYPE
Definition: samsung-spl2-header.h:34
@ SPL_DINA5_TYPE
Definition: samsung-spl2-header.h:44
@ SPL_LETTER_TYPE
Definition: samsung-spl2-header.h:29
@ SPL_DL_TYPE
Definition: samsung-spl2-header.h:38
@ SPL_DINC5_TYPE
Definition: samsung-spl2-header.h:37
@ SPL_DINC6_TYPE
Definition: samsung-spl2-header.h:48
@ SPL_FOLIO_TYPE
Definition: samsung-spl2-header.h:49
@ SPL_JPOST_TYPE
Definition: samsung-spl2-header.h:42
@ SPL_JISB5_TYPE
Definition: samsung-spl2-header.h:40
@ SPL_CUSTOM_TYPE
Definition: samsung-spl2-header.h:47
@ SPL_LEDGER_TYPE
Definition: samsung-spl2-header.h:33
@ SPL_JISB4_TYPE
Definition: samsung-spl2-header.h:39
@ SPL_JDOUBLE_TYPE
Definition: samsung-spl2-header.h:43
@ SPL_COM10_TYPE
Definition: samsung-spl2-header.h:35
@ SPL_LEGAL_TYPE
Definition: samsung-spl2-header.h:30
@ SPL_MONARCH_TYPE
Definition: samsung-spl2-header.h:36
@ SPL_ISOB5_TYPE
Definition: samsung-spl2-header.h:41
@ SPL_DINA6_TYPE
Definition: samsung-spl2-header.h:45
Each page is divided vertically into 'bands'. This data leads each band information.
Definition: samsung-spl2-header.h:125
uint16_t height
Definition: samsung-spl2-header.h:132
uint8_t compr
Definition: samsung-spl2-header.h:133
uint16_t width
Definition: samsung-spl2-header.h:131
uint8_t record
Definition: samsung-spl2-header.h:129
uint32_t length
Definition: samsung-spl2-header.h:134
uint8_t number
Definition: samsung-spl2-header.h:130
This header leads the comressed data for compression algorithmus with ID 0x11.
Definition: samsung-spl2-header.h:186
uint32_t raw_data_length
Definition: samsung-spl2-header.h:191
uint32_t marker
Definition: samsung-spl2-header.h:190
uint16_t table_ptr[0x40]
Definition: samsung-spl2-header.h:192
uint8_t raw_data[0]
Definition: samsung-spl2-header.h:193
This header record must lead each page to print.
Definition: samsung-spl2-header.h:87
uint8_t dummy3
Definition: samsung-spl2-header.h:103
uint8_t dummy2
Definition: samsung-spl2-header.h:101
uint8_t ptype
Definition: samsung-spl2-header.h:94
uint16_t plength
Definition: samsung-spl2-header.h:96
uint8_t dummy1
Definition: samsung-spl2-header.h:98
uint16_t copies
Definition: samsung-spl2-header.h:93
uint8_t tumble
Definition: samsung-spl2-header.h:100
uint8_t duplex
Definition: samsung-spl2-header.h:99
uint8_t pfeed
Definition: samsung-spl2-header.h:97
uint8_t yres
Definition: samsung-spl2-header.h:92
uint8_t ver
Definition: samsung-spl2-header.h:102
uint8_t record
Definition: samsung-spl2-header.h:91
uint16_t pwidth
Definition: samsung-spl2-header.h:95
uint8_t xres
Definition: samsung-spl2-header.h:104