Structs card

카드 코딩과 관련된 정의 및 구조체들을 소개합니다.

Definitions

Card::CardNameColor::Type

카드 분류(색상).

namespace CardNameColor
{
    enum Type
    {
        None            = 0x00,

        WhiteWhite      = 0x11,
        WhiteRed        = 0x12,
        WhiteYellow     = 0x13,
        WhiteGreen      = 0x14,
        WhiteCyan       = 0x15,
        WhiteBlue       = 0x16,
        WhiteMagenta    = 0x17,
        WhiteBlack      = 0x18,
        
        RedWhite        = 0x21,
        RedRed          = 0x22,
        RedYellow       = 0x23,
        RedGreen        = 0x24,
        RedCyan         = 0x25,
        RedBlue         = 0x26,
        RedMagenta      = 0x27,
        RedBlack        = 0x28,

        YellowWhite     = 0x31,
        YellowRed       = 0x32,
        YellowYellow    = 0x33,
        YellowGreen     = 0x34,
        YellowCyan      = 0x35,
        YellowBlue      = 0x36,
        YellowMagenta   = 0x37,
        YellowBlack     = 0x38,

        GreenWhite      = 0x41,
        GreenRed        = 0x42,
        GreenYellow     = 0x43,
        GreenGreen      = 0x44,
        GreenCyan       = 0x45,
        GreenBlue       = 0x46,
        GreenMagenta    = 0x47,
        GreenBlack      = 0x48,

        CyanWhite       = 0x51,
        CyanRed         = 0x52,
        CyanYellow      = 0x53,
        CyanGreen       = 0x54,
        CyanCyan        = 0x55,
        CyanBlue        = 0x56,
        CyanMagenta     = 0x57,
        CyanBlack       = 0x58,

        BlueWhite       = 0x61,
        BlueRed         = 0x62,
        BlueYellow      = 0x63,
        BlueGreen       = 0x64,
        BlueCyan        = 0x65,
        BlueBlue        = 0x66,
        BlueMagenta     = 0x67,
        BlueBlack       = 0x68,

        MagentaWhite    = 0x71,
        MagentaRed      = 0x72,
        MagentaYellow   = 0x73,
        MagentaGreen    = 0x74,
        MagentaCyan     = 0x75,
        MagentaBlue     = 0x76,
        MagentaMagenta  = 0x77,
        MagentaBlack    = 0x78,

        BlackWhite      = 0x81,
        BlackRed        = 0x82,
        BlackYellow     = 0x83,
        BlackGreen      = 0x84,
        BlackCyan       = 0x85,
        BlackBlue       = 0x86,
        BlackMagenta    = 0x87,
        BlackBlack      = 0x88,
        
        EndOfType
    };
}

Card::CardNameCardCoding::Type

카드 코딩 모드.

Card::CardNamePiano::Type

피아노 모드.

Card::CardColor::Type

카드 색 분류.

Structs

Protocol::Card::Classify

카드 색상 분.

Protocol::Card::Classify 클래스를 배열로 사용(순서대로 front, rear)

변수 이름.

형식.

크기.

범위.

설명.

cc[0][0][0]

s8

1 Byte

-60 ~ 60

Red, Hue, Min

cc[0][0][1]

s8

1 Byte

-60 ~ 60

Red, Hue, Max

cc[0][1][0]

s8

1 Byte

0 ~ 100

Red, Saturaton, Min

cc[0][1][1]

s8

1 Byte

0 ~ 100

Red, Saturaton, Max

cc[0][2][0]

s8

1 Byte

0 ~ 100

Red, Lightness, Min

cc[0][2][1]

s8

1 Byte

0 ~ 100

Red, Lightness, Max

cc[1][0][0]

s8

1 Byte

-60 ~ 60

Yellow, Hue, Min

cc[1][0][1]

s8

1 Byte

-60 ~ 60

Yellow, Hue, Max

cc[1][1][0]

s8

1 Byte

0 ~ 100

Yellow, Saturaton, Min

cc[1][1][1]

s8

1 Byte

0 ~ 100

Yellow, Saturaton, Max

cc[1][2][0]

s8

1 Byte

0 ~ 100

Yellow, Lightness, Min

cc[1][2][1]

s8

1 Byte

0 ~ 100

Yellow, Lightness, Max

cc[2][0][0]

s8

1 Byte

-60 ~ 60

Green, Hue, Min

cc[2][0][1]

s8

1 Byte

-60 ~ 60

Green, Hue, Max

cc[2][1][0]

s8

1 Byte

0 ~ 100

Green, Saturaton, Min

cc[2][1][1]

s8

1 Byte

0 ~ 100

Green, Saturaton, Max

cc[2][2][0]

s8

1 Byte

0 ~ 100

Green, Lightness, Min

cc[2][2][1]

s8

1 Byte

0 ~ 100

Green, Lightness, Max

cc[3][0][0]

s8

1 Byte

-60 ~ 60

Cyan, Hue, Min

cc[3][0][1]

s8

1 Byte

-60 ~ 60

Cyan, Hue, Max

cc[3][1][0]

s8

1 Byte

0 ~ 100

Cyan, Saturaton, Min

cc[3][1][1]

s8

1 Byte

0 ~ 100

Cyan, Saturaton, Max

cc[3][2][0]

s8

1 Byte

0 ~ 100

Cyan, Lightness, Min

cc[3][2][1]

s8

1 Byte

0 ~ 100

Cyan, Lightness, Max

cc[4][0][0]

s8

1 Byte

-60 ~ 60

Blue, Hue, Min

cc[4][0][1]

s8

1 Byte

-60 ~ 60

Blue, Hue, Max

cc[4][1][0]

s8

1 Byte

0 ~ 100

Blue, Saturaton, Min

cc[4][1][1]

s8

1 Byte

0 ~ 100

Blue, Saturaton, Max

cc[4][2][0]

s8

1 Byte

0 ~ 100

Blue, Lightness, Min

cc[4][2][1]

s8

1 Byte

0 ~ 100

Blue, Lightness, Max

cc[5][0][0]

s8

1 Byte

-60 ~ 60

Magenta, Hue, Min

cc[5][0][1]

s8

1 Byte

-60 ~ 60

Magenta, Hue, Max

cc[5][1][0]

s8

1 Byte

0 ~ 100

Magenta, Saturaton, Min

cc[5][1][1]

s8

1 Byte

0 ~ 100

Magenta, Saturaton, Max

cc[5][2][0]

s8

1 Byte

0 ~ 100

Magenta, Lightness, Min

cc[5][2][1]

s8

1 Byte

0 ~ 100

Magenta, Lightness, Max

l[0]

s8

1 Byte

0 ~ 100

Lightness Min(Black)

l[1]

s8

1 Byte

0 ~ 100

Lightness Max(White)

Protocol::Card::Range

RGB Raw 데이터의 출력 범위(캘리브레이션 시 검정색과 흰 색을 읽혔을 때의 출력값을 기준으로 사용)

변수 이름.

형식.

크기.

범위.

설명.

range[0][0][1]

int16_t

24 Byte

0 ~ 4095

Front, Red, Min

range[0][0][2]

int16_t

24 Byte

0 ~ 4095

Front, Red, Max

range[0][1][1]

int16_t

24 Byte

0 ~ 4095

Front, Green, Min

range[0][1][2]

int16_t

24 Byte

0 ~ 4095

Front, Green, Max

range[0][2][1]

int16_t

24 Byte

0 ~ 4095

Front, Blue, Min

range[0][2][2]

int16_t

24 Byte

0 ~ 4095

Front, Blue, Max

range[1][0][1]

int16_t

24 Byte

0 ~ 4095

Rear, Red, Min

range[1][0][2]

int16_t

24 Byte

0 ~ 4095

Rear, Red, Max

range[1][1][1]

int16_t

24 Byte

0 ~ 4095

Rear, Green, Min

range[1][1][2]

int16_t

24 Byte

0 ~ 4095

Rear, Green, Max

range[1][2][1]

int16_t

24 Byte

0 ~ 4095

Rear, Blue, Min

range[1][2][2]

int16_t

24 Byte

0 ~ 4095

Rear, Blue, Max

Protocol::Card::Raw

카드 Raw 데이터.

rgbRaw : ADC에서 읽은 RGB의 RAW 데이터. rgb : rgbRaw를 range를 기준으로 0 ~ 255 사이의 값으로 변환한 값. hsvl : rgb를 hsv, hsl로 변환한 값. color : hsvl 값을 Color Classify에 설정된 기준으로 판별한 색. card : 카드(front 상위 4비트, rear 하위 4비트).

변수 이름.

형식.

크기.

범위.

설명.

rgbRaw[0][0]

int16_t

2 Byte

0 ~ 4095

Raw, Front, Red

rgbRaw[0][1]

int16_t

2 Byte

0 ~ 4095

Raw, Front, Green

rgbRaw[0][2]

int16_t

2 Byte

0 ~ 4095

Raw, Front, Blue

rgbRaw[1][0]

int16_t

2 Byte

0 ~ 4095

Raw, Rear, Red

rgbRaw[1][1]

int16_t

2 Byte

0 ~ 4095

Raw, Rear, Green

rgbRaw[1][2]

int16_t

2 Byte

0 ~ 4095

Raw, Rear, Blue

rgb[0][0]

int16_t

1 Byte

0 ~ 255

Front, Red

rgb[0][1]

int16_t

1 Byte

0 ~ 255

Front, Green

rgb[0][2]

int16_t

1 Byte

0 ~ 255

Front, Blue

rgb[1][0]

int16_t

1 Byte

0 ~ 255

Rear, Red

rgb[1][1]

int16_t

1 Byte

0 ~ 255

Rear, Green

rgb[1][2]

int16_t

1 Byte

0 ~ 255

Rear, Blue

hsvl[0][0]

int16_t

2 Byte

0 ~ 360

Front, Hue

hsvl[0][1]

int16_t

2 Byte

0 ~ 100

Front, Saturation

hsvl[0][2]

int16_t

2 Byte

0 ~ 100

Front, Value

hsvl[0][3]

int16_t

2 Byte

0 ~ 100

Front, Lightness

hsvl[1][0]

int16_t

2 Byte

0 ~ 360

Rear, Hue

hsvl[1][1]

int16_t

2 Byte

0 ~ 100

Rear, Saturation

hsvl[1][2]

int16_t

2 Byte

0 ~ 100

Rear, Value

hsvl[1][3]

int16_t

2 Byte

0 ~ 100

Rear, Lightness

color[0]

Card::CardColor::Type

1 Byte

-

Front Color

color[1]

Card::CardColor::Type

1 Byte

-

Rear Color

card

Card::CardNameColor::Type, Card::CardNameCardCoding::Type, Card::CardNamePiano::Type

1 Byte

-

카드.

Protocol::Card::Color

카드 데이터(무선 통신에 사용하려고 Raw에서 크기를 줄임).

hsvl : rgb를 hsv, hsl로 변환한 값. color : hsvl 값을 Color Classify에 설정된 기준으로 판별한 색. card : 카드(front 상위 4비트, rear 하위 4비트).

변수 이름.

형식.

크기.

범위.

설명.

hsvl[0][0]

int16_t

2 Byte

0 ~ 360

Front, Hue

hsvl[0][1]

int16_t

2 Byte

0 ~ 100

Front, Saturation

hsvl[0][2]

int16_t

2 Byte

0 ~ 100

Front, Value

hsvl[0][3]

int16_t

2 Byte

0 ~ 100

Front, Lightness

hsvl[1][0]

int16_t

2 Byte

0 ~ 360

Rear, Hue

hsvl[1][1]

int16_t

2 Byte

0 ~ 100

Rear, Saturation

hsvl[1][2]

int16_t

2 Byte

0 ~ 100

Rear, Value

hsvl[1][3]

int16_t

2 Byte

0 ~ 100

Rear, Lightness

color[0]

Card::CardColor::Type

1 Byte

-

Front Color

color[1]

Card::CardColor::Type

1 Byte

-

Rear Color

card

Card::CardNameColor::Type, Card::CardNameCardCoding::Type, Card::CardNamePiano::Type

1 Byte

-

카드.

Protocol::Card::Raw

카드 목록.

변수 이름.

형식.

크기.

범위.

설명.

index

uint8_t

1 Byte

0 ~ 100

현재 실행중인 카드의 인덱스.

size

uint8_t

1 Byte

0 ~ 100

입력된 카드의 총 갯수.

cardIndex

uint8_t

1 Byte

0 ~ 100

현재 전송하는 카드 배열의 시작 번호.

card[12]

Card::CardNameColor::Type, Card::CardNameFunction::Type

12 Byte

-

카드 목록.

Last updated